Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Have 2 Macros run in a specific order...Can This Be Done

Right now I have a macro named Auto_open and as you know as soon as excel is
opened it runs the macro. This macro copies 100 Excel spreadsheets from one
location on the network to a different location. Works Fine.

I then have another macro that takes all those 100 spreadsheets and combines
them into 1 spreasheet. Works Fine.

Is there a way that I can have the Auto_open macro run 1st just like it
does, and then as soon as it finishes, have the other Macro to merge the
spreadsheets run without the user having to acutally click on Run Macro?

Thanks;
The Dawg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Have 2 Macros run in a specific order...Can This Be Done

I keep getting a compile error:
Only comments may appear after End Sub, End Function, or End Property

"Chip Pearson" wrote:

Just call the second macro from Auto_Open:

Sub Auto_Open()
' your code
SecondMacro
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Dtown Dawg" wrote in
message
...
Right now I have a macro named Auto_open and as you know as
soon as excel is
opened it runs the macro. This macro copies 100 Excel
spreadsheets from one
location on the network to a different location. Works Fine.

I then have another macro that takes all those 100 spreadsheets
and combines
them into 1 spreasheet. Works Fine.

Is there a way that I can have the Auto_open macro run 1st just
like it
does, and then as soon as it finishes, have the other Macro to
merge the
spreadsheets run without the user having to acutally click on
Run Macro?

Thanks;
The Dawg




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Have 2 Macros run in a specific order...Can This Be Done

This message indicates that you are placing the call to
SecondMacro after the End Sub statement. Don't do that. Put it
before the End Sub line.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Dtown Dawg" wrote in
message
...
I keep getting a compile error:
Only comments may appear after End Sub, End Function, or End
Property

"Chip Pearson" wrote:

Just call the second macro from Auto_Open:

Sub Auto_Open()
' your code
SecondMacro
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Dtown Dawg" wrote in
message
...
Right now I have a macro named Auto_open and as you know as
soon as excel is
opened it runs the macro. This macro copies 100 Excel
spreadsheets from one
location on the network to a different location. Works Fine.

I then have another macro that takes all those 100
spreadsheets
and combines
them into 1 spreasheet. Works Fine.

Is there a way that I can have the Auto_open macro run 1st
just
like it
does, and then as soon as it finishes, have the other Macro
to
merge the
spreadsheets run without the user having to acutally click
on
Run Macro?

Thanks;
The Dawg






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
Specific sort order RobM Excel Discussion (Misc queries) 5 July 12th 08 08:50 PM
What is the best way to organize a data in order to PRINT specific FC Excel Discussion (Misc queries) 4 July 9th 07 10:56 AM
Have 2 Macros run in a specific order...Can This Be Done Chip Pearson Excel Programming 0 June 7th 06 05:39 PM
print specific worksheets in specific order. jarvo Excel Programming 1 April 11th 06 11:05 AM
Calculations And Order In Macros Carl Bowman Excel Discussion (Misc queries) 4 February 23rd 05 10:53 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"