Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Insert/Edit a General Table via VBA

Status
Not open for further replies.

smma

Mechanical
Jun 4, 2007
24
I am writing a VBA macro that will populate a Solidworks General Table from a range of cells in Excel. What I would like to do is either edit an existing general table or insert a new one, via an If/Then statement. I can insert one with no problem, but I can't seem to edit/select an existing one. The funny thing is, I can get this to work with a Revision Table. Here is the If/Then statement for the Rev Table:

Dim RevTable As Object
If Not Part.GetCurrentSheet.RevisionTable Is Nothing Then
Set RevTable = Part.GetCurrentSheet.RevisionTable
Else
Set RevTable = Part.GetCurrentSheet.InsertRevisionTable(True, 0, 0, 4, _
"W:\BLOCKS\SolidWorks Templates\Other\REVISION TABLE.sldrevtbt")
End If

This works just fine. What can I do for the general table? Any suggestions???
 
Replies continue below

Recommended for you

smma,

You apparently posted this question in the SolidWorks forum too. I posted my reply there.

SA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor