G
Guest
First of all, thanks everyone for the invaluable help you've provided me on
this message board! ...now....
code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'code to hide certain sheets
Me.Save
Cancel = True
'code to unhide certain sheets
End Sub
question: what exactly does the Cancel = True do (or not do)?
I found that when I was trying to Save As a new filename that I was not
being given the option to change the name. when I comment out the Cancel =
True line in my BeforeSave procedure I am able to do save with a new filename
when doing a Save As. I want to understand why this is so, so that I know
that I am not inadvertently causing other potential problems by removing the
Cancel = True.
TIA
Tanya (vba newbie)
this message board! ...now....
code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'code to hide certain sheets
Me.Save
Cancel = True
'code to unhide certain sheets
End Sub
question: what exactly does the Cancel = True do (or not do)?
I found that when I was trying to Save As a new filename that I was not
being given the option to change the name. when I comment out the Cancel =
True line in my BeforeSave procedure I am able to do save with a new filename
when doing a Save As. I want to understand why this is so, so that I know
that I am not inadvertently causing other potential problems by removing the
Cancel = True.
TIA
Tanya (vba newbie)