Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Does anyone know of a Macro such as: Auto_Open or On_Open.
I think there is something someplace in Excel or VB that has this command. Please let me know where it is at, if there is one. I can not find either in Excel Help or VB Help. Thanks Matt@Launchnet -- Please take a look at www.openoursite.com Click on: "Keywords" and then Click on "Matt's Story" and if you are a man, you should be very happy that you read my story. God Bless for everyones help. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Auto_open will do the trick if placed into a General module.
Sub Auto_Open() msgbox "Good Morning" or run a macro by name End Sub Workbook_Open is used in Thisworkbook module. Private Sub Workbook_Open() msgbox "Good Morning" or run a macro by name End Sub If you go to VB help and type in "workbook event code" you will get a list of supported events. Gord Dibben MS Excel MVP On Fri, 20 Jul 2007 00:23:59 GMT, "Launchnet" <u20911@uwe wrote: Does anyone know of a Macro such as: Auto_Open or On_Open. I think there is something someplace in Excel or VB that has this command. Please let me know where it is at, if there is one. I can not find either in Excel Help or VB Help. Thanks Matt@Launchnet |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Hi Gord
Sorry, my coding is terrible. I tried test 1 & 2 and naturally, neither worked. I really want Test 2 to run when the workbook is opened. All my macros are in the General Module and that is where I placed the below code. Thanks for your help in advance Matt@Launchnet Sub auto_open() MsgBox "Welcome to MyMenu" 'Test 1 Run_macro Picture3_Click 'Picture3_Click is the macro I want to run only 'Test 2 Application.Goto Reference:="R1C1" 'or . . . this row only. End Sub Gord Dibben wrote: Auto_open will do the trick if placed into a General module. Sub Auto_Open() msgbox "Good Morning" or run a macro by name End Sub Workbook_Open is used in Thisworkbook module. Private Sub Workbook_Open() msgbox "Good Morning" or run a macro by name End Sub If you go to VB help and type in "workbook event code" you will get a list of supported events. Gord Dibben MS Excel MVP Does anyone know of a Macro such as: Auto_Open or On_Open. I think there is something someplace in Excel or VB that has this command. [quoted text clipped - 3 lines] Thanks Matt@Launchnet -- Please take a look at www.openoursite.com Click on: "Keywords" and then Click on "Matt's Story" and if you are a man, you should be very happy that you read my story. God Bless for everyones help. Message posted via http://www.officekb.com |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Did you put Call Test2 in the auto_open subroutine?
Your coding doesn't show it. If you don't call it, Test2 won't get done. You can use either Call Test2 or simply Test2() "Launchnet via OfficeKB.com" <u20911@uwe wrote in message news:756ef64e728aa@uwe... Hi Gord Sorry, my coding is terrible. I tried test 1 & 2 and naturally, neither worked. I really want Test 2 to run when the workbook is opened. All my macros are in the General Module and that is where I placed the below code. Thanks for your help in advance Matt@Launchnet Sub auto_open() MsgBox "Welcome to MyMenu" 'Test 1 Run_macro Picture3_Click 'Picture3_Click is the macro I want to run only 'Test 2 Application.Goto Reference:="R1C1" 'or . . . this row only. End Sub Gord Dibben wrote: Auto_open will do the trick if placed into a General module. Sub Auto_Open() msgbox "Good Morning" or run a macro by name End Sub Workbook_Open is used in Thisworkbook module. Private Sub Workbook_Open() msgbox "Good Morning" or run a macro by name End Sub If you go to VB help and type in "workbook event code" you will get a list of supported events. Gord Dibben MS Excel MVP Does anyone know of a Macro such as: Auto_Open or On_Open. I think there is something someplace in Excel or VB that has this command. [quoted text clipped - 3 lines] Thanks Matt@Launchnet -- Please take a look at www.openoursite.com Click on: "Keywords" and then Click on "Matt's Story" and if you are a man, you should be very happy that you read my story. God Bless for everyones help. Message posted via http://www.officekb.com |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Here is what I tried:
Sub auto_open() MsgBox ("Welcome to MyMenu") Picture3_Click() 'This is my sub-routine name End Sub The message box does not appear and sub-routine Picture3_Click() did not do anything I even tried Call Picture3_Click() when i moved off that code line the () disappeared - It still didn't work either. Help Again Pleasee Matt@Launchnet Dave Thomas wrote: Did you put Call Test2 in the auto_open subroutine? Your coding doesn't show it. If you don't call it, Test2 won't get done. You can use either Call Test2 or simply Test2() Hi Gord [quoted text clipped - 46 lines] Thanks Matt@Launchnet -- Please take a look at www.openoursite.com Click on: "Keywords" and then Click on "Matt's Story" and if you are a man, you should be very happy that you read my story. God Bless for everyones help. Message posted via http://www.officekb.com |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
I inserted a module in a new workbook, put the code below in it, saved it,
closed it , opened it and got the 2 messages shown below.. Sub auto_open() MsgBox ("here in autoopen") Call testit End Sub Sub testit() MsgBox ("This is testit") End Sub "Launchnet via OfficeKB.com" <u20911@uwe wrote in message news:756f8b69c022a@uwe... Here is what I tried: Sub auto_open() MsgBox ("Welcome to MyMenu") Picture3_Click() 'This is my sub-routine name End Sub The message box does not appear and sub-routine Picture3_Click() did not do anything I even tried Call Picture3_Click() when i moved off that code line the () disappeared - It still didn't work either. Help Again Pleasee Matt@Launchnet Dave Thomas wrote: Did you put Call Test2 in the auto_open subroutine? Your coding doesn't show it. If you don't call it, Test2 won't get done. You can use either Call Test2 or simply Test2() Hi Gord [quoted text clipped - 46 lines] Thanks Matt@Launchnet -- Please take a look at www.openoursite.com Click on: "Keywords" and then Click on "Matt's Story" and if you are a man, you should be very happy that you read my story. God Bless for everyones help. Message posted via http://www.officekb.com |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Just in case... If a workbook is opened using VBA code then any Auto_Open macros will not run. They must be called using the RunAutoMacros method. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Dave Thomas" wrote in message I inserted a module in a new workbook, put the code below in it, saved it, closed it , opened it and got the 2 messages shown below.. Sub auto_open() MsgBox ("here in autoopen") Call testit End Sub Sub testit() MsgBox ("This is testit") End Sub |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Auto Open Macro
Thanks Everybody. I was for ease in development only, opening my file with a
macro. As soon as I tried it opening it directly from Excel, it works fine. Again Thanks Matt@Launchnet Jim Cone wrote: Just in case... If a workbook is opened using VBA code then any Auto_Open macros will not run. They must be called using the RunAutoMacros method. -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Using Container in Auto open macro | Excel Discussion (Misc queries) | |||
How to auto activate macro when file open ? | Excel Worksheet Functions | |||
Auto Open | Excel Discussion (Misc queries) | |||
How do I get my personal macro worksheet to open whenever I open . | Excel Discussion (Misc queries) |