Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing an existing Excel table via VB

Status
Not open for further replies.

MusicDude

Mechanical
Jan 23, 2003
6
US
I cannot find the code to allow me to edit an existing Excel table in a drawing. I have all the code working that changes the actual cells, but I can't find what I need to make the table "active"- the equivalent of double clicking on it. Any suggestions?
 
Replies continue below

Recommended for you

Is it an Excel-based BOM? If so, the following commands should work.

BomTable::Attach3
BomTable::Detach
 
It's not a BOM, but it is Excel-based. It's just a standard MS Excel Worksheet that was inserted either by Insert\Object\Worksheet or copy/pasted in.
 
Well, I thought ObjectDisplayasContent would work, but...

What else have you tried?


Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
 
ModelDoc2.ActivateSelectedFeature did the trick (thanks Earl). That worked great to get me into edit mode, now I cn't figure out how to get out of it! I have used selectbyID to pick a blank spot (which should kick me out of editing the table), but it doesn't do anything. I need a "deActivateSelectedFeature" ... but haven't found anything yet.
 
What if you just select another feature? Or, clear selection?

Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
 
I have used selectbyID to pick a blank spot (which should kick me out of editing the table), but it doesn't do anything. I also have tried selecting a view and activating it- it didn't like that at all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top