Frank Freese
asked on
Calling sub routine from a module
Folks,
When I activate a worksheet I call "NotifyUserGeneral":
When I activate a worksheet I call "NotifyUserGeneral":
Private Sub Worksheet_Activate()
NotifyUserGeneral
End Sub
I have a module that contains "NotifyUserGeneral" below:Option Explicit
Private mMessageDisplayed As Boolean
-----------------------------------------------------------------------
Private Sub Worksheet_Activate()
NotifyUserGeneral
End Sub
-----------------------------------------------------------------------
Private Sub NotifyUserGeneral()
If ActiveSheet.ProtectContents = True And Not mMessageDisplayed Then
MsgBox "Except for the data cells shaded in light blue with black font the rest of this worksheet is protected!"
mMessageDisplayed = True
End If
End Sub
---------------------------------------------------------------------------
Private Sub NotifyUserCell()
If ActiveSheet.ProtectContents = True And ActiveCell.Locked = True Then
Msbbox "That cell is protected and cannot be changed!"
End If
End Sub
----------------------------------------------------------------------------------------------------------
However, I keep getting "Sub or Function not defined" error when I activate the worksheet?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you very much
ASKER
Thanks