Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Can somebody please explain how to run microsoft excel macros when the worksheet is opened?
5 replies
by jonesie.c
When in the Workbook go in to the VBA Editor. You do this by pressing the Alt+F11 key's.
Double click on the ThisWorkbook object on the left - a new window wil appear.
Type the follong into the new window.
Private Sub Workbook_Activate() 'remove there two lines of text and
'type your code here
End Sub
For Example:-
Private Sub Workbook_Activate()
MsgBox("Hello")
End Sub
by saber_echo
The question was auto-closed by TechRepublic
by syscokid
Answer #1 is correct.
by saber_echo
The question was auto-closed by TechRepublic
by saber_echo
This question was auto closed due to inactivity
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending
0 helpful
11 replies
Question Locked
Do You Save Useful Windows Tutorial Videos for Later
0 helpful
7 replies
0 helpful
1 reply
Question Unanswered
Is WSL still relevant in 2026?
0 helpful
0 replies
0 helpful
2 replies