View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Copy and Paste all workbooks of a file

assuming spreadsheet means an individual worksheet and spreadsheets means all
worksheets, then perhaps to run macro1 on all sheets (where macro1 is
designed to work on the activesheet):

sub RunMacro1()
Dim sh as worksheet
for each sh in ActiveWorkbook.Worksheets
sh.Active
macro1
Next
end sub
--
Regards,
Tom Ogilvy


" wrote:


wrote:
Hello there, a simple question, or so I think for everybody
I want to ensure I copy and paste every single workbooks of my file
when activating the macro, and not write a macro specifying some
workbooks, what the code should look like please?
many thanks to any help
Dan


huuummm I mean every sheet of my spreadsheet...