I am stuck! I have a worksheet that is protected. However, I have an ActiveX control button that I want users to be able to use. I have tried building in the unprotect functionality into the ActiveX control as follows:
Sub PrefSelection()
'
' PrefSelection Macro
'
'
Sheet13.Unprotect Password:="password"
(my code)
Sheet13.Protect Password:="abqaiq1!"
End Sub
But no luck. I have also tried building it into ThisWorksheet as a start event as follows:
Private Sub Workbook_Open()
Welcome.Show
Sheets(13).Protect Password:="password", _
UserInterFaceOnly:=True
End Sub
I have a Spash Screen thus the "Welcome.Show" coding. Unfortunately this does not work either. The macro appears to work but I still get the error indicating that the spreadsheet is protected when I try and run the ActiveX control.
I'm considering putting in a control box to unlock the sheet that the user has to push before making an ActiveX selection. It is really sloppy though.
Any ideas??
Thanks,
Omar
Sub PrefSelection()
'
' PrefSelection Macro
'
'
Sheet13.Unprotect Password:="password"
(my code)
Sheet13.Protect Password:="abqaiq1!"
End Sub
But no luck. I have also tried building it into ThisWorksheet as a start event as follows:
Private Sub Workbook_Open()
Welcome.Show
Sheets(13).Protect Password:="password", _
UserInterFaceOnly:=True
End Sub
I have a Spash Screen thus the "Welcome.Show" coding. Unfortunately this does not work either. The macro appears to work but I still get the error indicating that the spreadsheet is protected when I try and run the ActiveX control.
I'm considering putting in a control box to unlock the sheet that the user has to push before making an ActiveX selection. It is really sloppy though.
Any ideas??
Thanks,
Omar