ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto macro opening excel workbook (https://www.excelbanter.com/excel-programming/335634-auto-macro-opening-excel-workbook.html)

Baris

Auto macro opening excel workbook
 
I would like to run automaticaly a macro when opening a workbook.
I have found answers, but I don't understand them. Please detail me the step
in excel and visual basic to make this possible.

Thank you very much in advance.

Bob Phillips[_6_]

Auto macro opening excel workbook
 

Private Sub Workbook_Open()
'your code here
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Baris" wrote in message
...
I would like to run automaticaly a macro when opening a workbook.
I have found answers, but I don't understand them. Please detail me the

step
in excel and visual basic to make this possible.

Thank you very much in advance.




Chip Pearson

Auto macro opening excel workbook
 
Open the VBA Editor. Go to the Insert menu and choose Module (not
Class Module). In that module, place the following code:

Sub Auto_Open()
' the code you want to run
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Baris" wrote in message
...
I would like to run automaticaly a macro when opening a
workbook.
I have found answers, but I don't understand them. Please
detail me the step
in excel and visual basic to make this possible.

Thank you very much in advance.





All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com