A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

automatic macro at opening of excel file



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2004, 01:07 AM
Willystu
external usenet poster
 
Posts: n/a
Default automatic macro at opening of excel file

How do you write a macro to run automatically when opening an excel file? I
find no information in Excel Help, nor several excel/VBA textbooks from
library. This was exceptionally easy to do in Lotus 1-2-3 and seems to me to
be an essential tool.
  #2  
Old October 27th, 2004, 01:18 AM
Gord Dibben
external usenet poster
 
Posts: n/a
Default

Willy

You can use in a General Module

Sub Auto_Open()
your code or macroname
End Sub

Or in the ThisWorkbook module.

Sub WorkBook_Open()
your code or macroname
End Sub


Gord Dibben Excel MVP


On Tue, 26 Oct 2004 17:07:04 -0700, "Willystu"
wrote:

How do you write a macro to run automatically when opening an excel file? I
find no information in Excel Help, nor several excel/VBA textbooks from
library. This was exceptionally easy to do in Lotus 1-2-3 and seems to me to
be an essential tool.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening an Excel file Jamie A Miller General Discussion 2 March 3rd, 2005 10:29 PM
opening an excel file branislav New Users 3 August 25th, 2004 07:49 AM
Excel is always opening the same file - how to fix? newengland General Discussion 4 June 16th, 2004 11:27 PM
Product Key for Office XP P.G.Indiana Setup, Installing & Configuration 1 June 7th, 2004 03:22 AM
Productkey problem when installing office 2003 on network Stefan Schreurs Setup, Installing & Configuration 1 June 1st, 2004 11:16 PM


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


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