(OT)Run Macro automatically in Excel [SMC WIRE FABRICATORS]

In the macro editor under the Microsoft Excel Objects Select This WorkBook

Then in the top of the code window select workbook from the first drop down
men
In the second drop down menu select open.

Insert your code here. This maro will run whenever this workbook is opened.

If you have any questions feel free to contact me directly.


Scott Hemmerlein

Information Systems Manager
Sommer Metalcraft Corp
315 Poston Drive
Crawfordsville, IN 47933

voice 765 359-4258
fax 765 359-4201

www.sommermetalcraft.com

e-mail hemmerls@...!
Hey everyone!

How do I run a macro automatically in Excel? I created a macro that will sort a column. I would like the macro to automatically sort the column each and every time a person open the document. ...............without the user needing to click anything to run the macro...........

Thanks!

Wendy Bowen
Network Administrator
Schmald Tool & Die, Inc.
Burton, Michigan

[Non-text portions of this message have been removed]
Wendy,

Your post made me curious, so I had to figure this out this morning.
After a few struggles I finally got it to work!

The first thing I did was open an Excel document and record a macro.
Then open VBA editor and change the Procedure name of the macro
to:Private Sub workbook_Open() . Then copy the whole procdure, right
click on the "ThisWorkbook" icon in the project explorer window and
choose "View Code". Paste the procedure into the code window. Close
the VBA editor, close and save the Excel file, and when you re-open
the file your macro will run.

Hope I explained this clearly, good luck.

Brian Stenglein
Clow Stamping Co.

--- In vantage@y..., "Wendy Bowen \(Pursche\)" <wpursche@s...> wrote:
> Hey everyone!
>
> How do I run a macro automatically in Excel? I created a macro
that will sort a column. I would like the macro to automatically
sort the column each and every time a person open the
document. ...............without the user needing to click anything
to run the macro...........
>
> Thanks!
>
> Wendy Bowen
> Network Administrator
> Schmald Tool & Die, Inc.
> Burton, Michigan
>
> [Non-text portions of this message have been removed]
Brian,

Thank you very much!!!

~Wendy
----- Original Message -----
From: B_Stinger
To: vantage@yahoogroups.com
Sent: Wednesday, June 12, 2002 9:12 AM
Subject: [Vantage] Re: (OT)Run Macro automatically in Excel


Wendy,

Your post made me curious, so I had to figure this out this morning.
After a few struggles I finally got it to work!

The first thing I did was open an Excel document and record a macro.
Then open VBA editor and change the Procedure name of the macro
to:Private Sub workbook_Open() . Then copy the whole procdure, right
click on the "ThisWorkbook" icon in the project explorer window and
choose "View Code". Paste the procedure into the code window. Close
the VBA editor, close and save the Excel file, and when you re-open
the file your macro will run.

Hope I explained this clearly, good luck.

Brian Stenglein
Clow Stamping Co.

--- In vantage@y..., "Wendy Bowen \(Pursche\)" <wpursche@s...> wrote:
> Hey everyone!
>
> How do I run a macro automatically in Excel? I created a macro
that will sort a column. I would like the macro to automatically
sort the column each and every time a person open the
document. ...............without the user needing to click anything
to run the macro...........
>
> Thanks!
>
> Wendy Bowen
> Network Administrator
> Schmald Tool & Die, Inc.
> Burton, Michigan

[Non-text portions of this message have been removed]
What version of Excel are you using? If your using 97 or later then if you create a sub routine - called Workbook_Open() and place this routine in the "This workbook" section of the VBA Editor. Inside this you can then place whatever code you need to and it will execute when the sheet is opened. Out of interest if you want to run a macro when the worksheet is activated, if you have multiple sheets, the event is Worksheet_Activate() and this needs to be saved on the sheet you intend to run it from on the VBA editor. I've tested the event in Office XP and it works fine.

Regards

Martin Horton
PRD Holdings Ltd.
----- Original Message -----
From: Wendy Bowen (Pursche)
To: vantage@yahoogroups.com
Sent: Wednesday, June 12, 2002 1:08 PM
Subject: [Vantage] (OT)Run Macro automatically in Excel


Hey everyone!

How do I run a macro automatically in Excel? I created a macro that will sort a column. I would like the macro to automatically sort the column each and every time a person open the document. ...............without the user needing to click anything to run the macro...........

Thanks!

Wendy Bowen
Network Administrator
Schmald Tool & Die, Inc.
Burton, Michigan

[Non-text portions of this message have been removed]


Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/links

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]