ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run a sub or function on program start? (https://www.excelbanter.com/excel-programming/316718-run-sub-function-program-start.html)

RASelkirk

Run a sub or function on program start?
 

I used to know how to do this, but that was a few years ago... What'
the trick to running a VBA sub whenever the workbook is opene
(startup), say for example:

Sub Runme()

msgbox "I'm running"

End Su

--
RASelkir
-----------------------------------------------------------------------
RASelkirk's Profile: http://www.excelforum.com/member.php...fo&userid=1621
View this thread: http://www.excelforum.com/showthread.php?threadid=27804


Frank Kabel

Run a sub or function on program start?
 
Hi
einther put your code in the workbook_open event of your workbook
module or name your sub auto_open()

--
Regards
Frank Kabel
Frankfurt, Germany


RASelkirk wrote:
I used to know how to do this, but that was a few years ago... What's
the trick to running a VBA sub whenever the workbook is opened
(startup), say for example:

Sub Runme()

msgbox "I'm running"

End Sub



Glen Mettler[_4_]

Run a sub or function on program start?
 
Sub auto_open()
Call MyProgram
End Sub

Glen

"RASelkirk" wrote in message
...

I used to know how to do this, but that was a few years ago... What's
the trick to running a VBA sub whenever the workbook is opened
(startup), say for example:

Sub Runme()

msgbox "I'm running"

End Sub


--
RASelkirk
------------------------------------------------------------------------
RASelkirk's Profile:
http://www.excelforum.com/member.php...o&userid=16216
View this thread: http://www.excelforum.com/showthread...hreadid=278044





All times are GMT +1. The time now is 05:38 PM.

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