Run all vba at once after opening excel file

eunice3301 13 Posts Thursday July 27, 2017Registration date August 29, 2017 Last seen - Jul 31, 2017 at 03:40 AM - Latest reply: eunice3301 13 Posts Thursday July 27, 2017Registration date August 29, 2017 Last seen
- Aug 1, 2017 at 12:58 AM
Hello,

Please help me. I want to run the macros at once after opening the excel file.

I have different codes in each sheet.

Please i need your help guys.

Thank you


See more 

Your reply

2 replies

Best answer
ac3mark 9909 Posts Monday June 3, 2013Registration dateModeratorStatus July 14, 2018 Last seen - Jul 31, 2017 at 05:07 PM
1
Thank you
You wold have to run a master procedure, and call of them upon, Workbook_Open() event.

So, in others words, if you have a module, that contains 5 subroutines, you would need to do the following:

private sub mastersub()
call subone
call subtwo
call subthree
call subfour
call subfive
end sub

private sub Workbook_Open()
call mastersub
end sub

Thank you, ac3mark 1

Something to say? Add comment

CCM has helped 1700 users this month

Respond to ac3mark
eunice3301 13 Posts Thursday July 27, 2017Registration date August 29, 2017 Last seen - Aug 1, 2017 at 12:58 AM
0
Thank you
Thank you so much mark. I also tried this

Private Sub Auto_Open()
Run ("Sheet3.Auto_Open")
Run ("Sheet5.Auto_Open")
Run ("Sheet6.Auto_Open")
End Sub

and it works.

I will try your suggestion. Thank you so much for the help=)
Respond to eunice3301