tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,834
- Office Version
- 365
- 2019
- Platform
- Windows
Is there any reason why worksheet events, such as:
are private?
I am thinking of changing it to Public so it can be called elsewhere. Is that a bad idea and might it cause problems?
Alternatively, I can leave it as Private but put the code in a separate module, like this:
and have a module called ModHi:
Thanks
Code:
Private Sub Worksheet_Activate()
Msgbox "Hi"
End Sub
are private?
I am thinking of changing it to Public so it can be called elsewhere. Is that a bad idea and might it cause problems?
Alternatively, I can leave it as Private but put the code in a separate module, like this:
Code:
Private Sub Worksheet_Activate()
Call ModHi.Hi
End Sub
and have a module called ModHi:
Code:
Public Sub Hi()
Msgbox "Hi"
End Sub
Thanks