LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
davesexcel
 
Posts: n/a
Default Run a macro automatically on workbook open


at the top menu beside File, there is an excel symbol, right click on
that icon and select view codes,
Now at the drop down menu where it says general, drop down the menu to
select -workbook
go to the next drop down menu and select -open
beginning and ending code appears
put your copy and paste your macro between these two lines of code
for example purposes
popy and paste this code in between those two lines


Dim Msg As String

Msg = "This is Dave's great WorkBook!!"
MsgBox Msg

it will end up looking like this


Private Sub Workbook_Open()
Dim Msg As String

Msg = "This is Dave's great WorkBook!!"
MsgBox Msg
End Sub
Once you have that right then practise butting in the code from your
macro
Dave


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=516505

 
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 giving errors at workbook open kcdonaldson Excel Discussion (Misc queries) 1 December 6th 05 04:15 PM
Links only update when external workbook is open CMB Excel Worksheet Functions 6 November 8th 05 12:39 AM
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
Automatically execute a CTRL-ALT-F9 when I open a workbook Antonio Duarte Excel Discussion (Misc queries) 1 June 15th 05 02:48 PM
Issuing macro in workbook from separate workbook Nigel Excel Discussion (Misc queries) 1 May 16th 05 05:46 PM


All times are GMT +1. The time now is 05:00 AM.

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"