View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default write a macro to run a macro

You have a couple of choices.

In your workbook_open code select the sheet you want then run the macro.

sub workbook_open()
Sheets("Sheet1").select
macroname
end sub

Or select the proper sheet in your macro.


Gord Dibben MS Excel MVP

On Fri, 14 Aug 2009 14:15:03 -0700, Flipper
wrote:

Ok, thanks Luke. I did get Automatic Run to work, but it leads me to another
problem, which is that whatever worksheet that was active when I closed the
workbook is where the Automatic Run places the results of the macro, rather
than where the macro is supposed to go. As follows
The workbook contains about 20 separate worksheets. I have 2 macros, each
macro applies specifically to 1 worksheet. That, one macro performs a series
of steps where it opens another file, copies data, and then pastes that data
into that specific worksheet. When I added the Automatic Run, it pasted the
data into whatever worksheet was active when I previously closed the workbook.