#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Macro question

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Macro question

On the left side of the screen where you built the macro, you should see a
project folder that lists all of the sheets (CTL-R if you don't see it)
double-click the ThisWorkbook icon, and then at the top there are 2 drop
downs, chose the one on the left and select workbook, it will automatically
open the open event for the workbook, paste your code there.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Macro question

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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Macro question

That worked John, Thanks for your help. As you can see, I am new to macros
so this community and knowlegable people like yourself make our daily tasks
easier and fun.

"John Bundy" wrote:

On the left side of the screen where you built the macro, you should see a
project folder that lists all of the sheets (CTL-R if you don't see it)
double-click the ThisWorkbook icon, and then at the top there are 2 drop
downs, chose the one on the left and select workbook, it will automatically
open the open event for the workbook, paste your code there.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"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.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Macro question

Thanks for your help gord works great.

"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.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Macro question

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.



  #7   Report Post  
Posted to microsoft.public.excel.misc
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.




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Macro question

Thanks for all your help.

"Gord Dibben" wrote:

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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Question carl Excel Worksheet Functions 3 May 16th 07 10:58 PM
Macro Question carl Excel Worksheet Functions 2 May 15th 07 07:23 PM
Macro Question carl Excel Worksheet Functions 0 May 10th 07 03:29 PM
Using a macro question. Adam Kroger Excel Discussion (Misc queries) 6 December 15th 05 09:55 PM
Question about macro Jason Excel Discussion (Misc queries) 0 April 27th 05 10:37 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"