View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kevin Vaughn[_3_] Kevin Vaughn[_3_] is offline
external usenet poster
 
Posts: 1
Default VBA Help on Not Copying Specific Worksheets


Ok, now I see the highlighted text. After some experimentation I foun
I got the error you indicate if I do not have spreadsheets with th
names that you are using in your for loop. For instance, I copied thi
to the immediate pane:
for each sh in sheets(array("hub 1", "hub 2")):? sh.name: next sh
And then I named my sheets hub 1 and hub 2. No problems. Then
changed 1 to 3 in the for each line and re-ran it and got the error yo
indicated (because I did not have a sheet named hub 3

--
Kevin Vaugh
-----------------------------------------------------------------------
Kevin Vaughn's Profile: http://www.excelforum.com/member.php...fo&userid=3485
View this thread: http://www.excelforum.com/showthread.php?threadid=54269