View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Macros Tabs and Files

hi,
when you "get a new file" is this a new file or an existing one that someone
sent to you? If a new file, how many sheets do you start with? by default,
new files have the first sheet as "sheet1". perhaps you could use sheet1 in
the macro and rename the sheet later to batty or hippopotamusy or what ever
if needed.
if only one sheet in the new file, then play a mind game with it.
For each sheet in activeworkbook
run macro
next
if no other sheets, you are out of the loop. end sub.

thought?
FSt1

"Jim" wrote:

Hi. I created a Macro to take a excell file (lets same its named Doggy),
sort and break up per my specs and place results on 7 different tabs. Works
good. However everytime I get a new file to convert through this Macro I
have to rename the file to Doggy before the macroo will work because that is
the name on the tab when I origionally created the macro. Here is the line
that is causing the issue - Sheets("Doggy").Select . is there a way around
this?

Thanks