hello
i have a userform that runs "before workbook close"
however, the problem that i am encountering is that, everytime i click on the cancel button, it does not hide the userform.
i have 4 buttons
1) sign off
2) clear
3) cancel
4) save/close
they all function except for "cancel"
i.e. if the person forgot to make a change in the workbook before they signoff, they hit the cancel button on the userform and the userform should hide. below is my macro, can someone pls help, ive been stumped on this for quite some time, pls and thx you
Private Sub cmdCancel2_Click()
Unload Me
End Sub
Private Sub cmdSaveClose_Click()
Unload Me
Application.ScreenUpdating = False
Dim ws As Worksheet
Worksheets("Warning").Visible = True
''Sheets().Visible = xlVeryHidden
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Warning" Then
ws.Visible = xlSheetHidden
End If
Next ws
ActiveWorkbook.Save
End Sub
basically, everytime i hit the cancel button, it just closes the file. can someone help me make it more dynamic pls!
Bookmarks