Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a macro when file is open
any one out there knows how to run a macro automatically in a workbook when
the workbook is open. I do not want the user to go to tools,macro,choose a name and run the macro, what I am looking for is a way to run the macro automatically. any one knows of a way to do this???? your comment is appreciated |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a macro when file is open
On your spreadsheet in the upper left corner is the excel logo. Right click
it and select view code. This will open up the VB screen and you will be in the ThisWorkbook object. Just above the Code window you will see a drop down with the word General in it. Change that to Workbook. At this point it should create some code in the Code window that looks like Private Sub Workbook_Open() End Sub This procedure will fire when the workbook is opened so just call your procedure from here like this Private Sub Workbook_Open() Call MyProcedure End Sub HTH "nabil" wrote: any one out there knows how to run a macro automatically in a workbook when the workbook is open. I do not want the user to go to tools,macro,choose a name and run the macro, what I am looking for is a way to run the macro automatically. any one knows of a way to do this???? your comment is appreciated |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a macro when file is open
can't you just fire your proc from Auto_Open?
"nabil" wrote in message ... any one out there knows how to run a macro automatically in a workbook when the workbook is open. I do not want the user to go to tools,macro,choose a name and run the macro, what I am looking for is a way to run the macro automatically. any one knows of a way to do this???? your comment is appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Excel file from VB and open MACRO | Excel Discussion (Misc queries) | |||
2007 Macro to Open File, Delete Contents, Save New File | Excel Discussion (Misc queries) | |||
ASP: Open Excel File with Macro, Allow Macro to run, and then save | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |