Thread: Auto Open Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Thomas Dave Thomas is offline
external usenet poster
 
Posts: 146
Default 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