ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Execute procedure on startup (https://www.excelbanter.com/excel-programming/293098-execute-procedure-startup.html)

Richard[_20_]

Execute procedure on startup
 
I would like to automatically run a procedure from within Excel upon start
I know that if I put the .xls file into the the subdirectory XLStart tha
Excel will pull up the spreadsheet automatically, but then how do I the
automatically execute a designated procedure? Thanks for any help.

Trevor Shuttleworth

Execute procedure on startup
 
Richard

call the macro Auto_Start (in a general module) or use the Worksheet_Open
event (in the WorksheetClass Module)

Private Sub Workbook_Open()
:
End Sub


Regards

Trevor


"Richard" wrote in message
...
I would like to automatically run a procedure from within Excel upon

start.
I know that if I put the .xls file into the the subdirectory XLStart that
Excel will pull up the spreadsheet automatically, but then how do I then
automatically execute a designated procedure? Thanks for any help.




Gord Dibben

Execute procedure on startup
 
Richard

In ThisWorkbook module.......

Private Sub Workbook_Open()
'your code here
End Sub

In a General module.......

Sub Auto_Open()
'your code here
End Sub

Gord Dibben Excel MVP

On Mon, 1 Mar 2004 13:56:05 -0800, "Richard"
wrote:

I would like to automatically run a procedure from within Excel upon start.
I know that if I put the .xls file into the the subdirectory XLStart that
Excel will pull up the spreadsheet automatically, but then how do I then
automatically execute a designated procedure? Thanks for any help.



Trevor Shuttleworth

Execute procedure on startup
 
Apologies ... one or two senior moments there !

Gord has provided the correct options

Auto_Open

or Workbook_Open in the ThisWorkbook module


"Trevor Shuttleworth" wrote in message
...
Richard

call the macro Auto_Start (in a general module) or use the Worksheet_Open
event (in the WorksheetClass Module)

Private Sub Workbook_Open()
:
End Sub


Regards

Trevor


"Richard" wrote in message
...
I would like to automatically run a procedure from within Excel upon

start.
I know that if I put the .xls file into the the subdirectory XLStart

that
Excel will pull up the spreadsheet automatically, but then how do I then
automatically execute a designated procedure? Thanks for any help.






RHolland

Execute procedure on startup
 
Thanks to both of you.


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com