bsj0526
Mechanical
- Jan 5, 2008
- 40
Hello,
I am working on a macro with some common commands that i can check off and press a button and it applies all the commands with a check. One command I am having trouble with is the close current document. I have tried a couple of different variations that I found by searching, but the only one I can get to work (sometimes) is below. I say sometimes, because it will work once, then it quits for a while. Does anyone know the correct way to do this?
End If
'Close
If CheckBox4 = True Then
swApp.CloseDoc sFileTitle
Else
End If
End Sub
I am working on a macro with some common commands that i can check off and press a button and it applies all the commands with a check. One command I am having trouble with is the close current document. I have tried a couple of different variations that I found by searching, but the only one I can get to work (sometimes) is below. I say sometimes, because it will work once, then it quits for a while. Does anyone know the correct way to do this?
End If
'Close
If CheckBox4 = True Then
swApp.CloseDoc sFileTitle
Else
End If
End Sub