Not a programmer but trying.
I am trying to turn off the sheet format of a specific sheet named "DXF Sheet". There could be multiple sheets in the drawings but only this sheet is to be turned off. The code below is not really doing what i want. For some reason it is turning the active sheet off from when i start the macro. I need to cycle through all sheets to find the correct sheet then turn off the "DXF Sheet"
Any help would be great
Dim SwDraw As DrawingDoc, SwSheet As Sheet
Dim DXF_Sheet As String
Dim swDrawingDoc As SldWorks.DrawingDoc
Set SwDraw = Application.SldWorks.ActiveDoc
Set SwSheet = SwDraw.GetCurrentSheet
vSheetNames = SwDraw.GetSheetNames
DXF_Sheet = "DXF Sheet"
For i = 0 To UBound(vSheetNames)
SheetName = vSheetNames(i)
If SheetName = DXF_Sheet Then
SheetName = "DXF Sheet"
SwSheet.SheetFormatVisible = False