Thread: Macro question
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Macro question

Either copy the code from the macro and paste directly between the lines or add
this line.

Private Sub Workbook_Open()
Application.Run ("Personal.xls!macroname")
End Sub


Gord

On Thu, 8 Nov 2007 09:32:04 -0800, Gilbert
wrote:

What if my macro is saved on my personal macro workbook instead of that
particular spreadsheet?

"Gord Dibben" wrote:

Right-click on Excel Icon left of "File" on menubar.

Select "View Code.

Select Workbook from left side dialog box to get these lines

Private Sub Workbook_Open()

End Sub

enter your macro name between like

Private Sub Workbook_Open()
macroname
End Sub

This assumes that you have macroname installed in a module in the workbook.


Gord Dibben MS Excel MVP

On Thu, 8 Nov 2007 08:33:01 -0800, Gilbert
wrote:

I created a macro in excel 2003. I would like the macro to run automatically
every time I open that particular spreasheet. Thank you in advance.