WilliUSF
Mechanical
- Feb 6, 2002
- 8
Hey all,
I am trying to change the focus from one sheet to another in a SolidWorks drawing using VBA.
Below is a clip from my macro. The swDraw.GetCurrentSheet line works fine so I think I have the correct libraries loaded but the swDraw.SheetNext (or SheetPrevious) does not work. I get "Compile Error: Expected Function or Variable"
and the .SheetNext is highlighted. I checked spelling and all. I dim'd the swNextSheet as Sldworks.Sheet as I did swsheet.
Set swsheet = swDraw.GetCurrentSheet
Set swNextSheet = swDraw.SheetNext
I'm still pretty new at VBA especially in SolidWorks.
Any help's appreciated
Thanks
I am trying to change the focus from one sheet to another in a SolidWorks drawing using VBA.
Below is a clip from my macro. The swDraw.GetCurrentSheet line works fine so I think I have the correct libraries loaded but the swDraw.SheetNext (or SheetPrevious) does not work. I get "Compile Error: Expected Function or Variable"
and the .SheetNext is highlighted. I checked spelling and all. I dim'd the swNextSheet as Sldworks.Sheet as I did swsheet.
Set swsheet = swDraw.GetCurrentSheet
Set swNextSheet = swDraw.SheetNext
I'm still pretty new at VBA especially in SolidWorks.
Any help's appreciated
Thanks