#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto macro

Dear people,
Can someone tell me how to get a macro to run uponj opening an excel file?
Thanks,
George



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Auto macro

Name it Auto_Open() and put it in a General module.

George Davis wrote:

Dear people,
Can someone tell me how to get a macro to run uponj opening an excel file?
Thanks,
George


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Auto macro

Hi George,

Call the macro from the workbook's open event, e.g:

'===========
Private Sub Workbook_Open
Call myMacro
End Sub
'<<===========

This code should be placed in the workbook's ThisWorkbook module - not in a
standard module and not in a sheet module.

Alternatively, name the macro Auto_Open and place it in a standard module.


For mor information on event procedures, see Chip Pearson atL

http://www.cpearson.com/excel/events.htm


---
Regards,
Norman



"George Davis" wrote in message
link.net...
Dear people,
Can someone tell me how to get a macro to run uponj opening an excel
file?
Thanks,
George





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
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
auto run macro John Garate Excel Programming 1 February 11th 05 08:18 PM
macro auto run nightshift12 Excel Programming 3 June 7th 04 08:09 AM
auto run a macro garima agrawal Excel Programming 2 August 9th 03 07:30 AM


All times are GMT +1. The time now is 06:20 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"