macro problem for a noob lol

B

bouncebackability

well i recorded a macro to unhide sheets week1 to week 12 and the
standings sheet, then to make a copy of them and to the end of the list
of sheets, then to rehide the orginals. ive done this but i have a bug
apparenly and so now im lost...

'
Sheets("Week1").Visible = True
Sheets("Week2").Visible = True
Sheets("Week3").Visible = True
Sheets("Week4").Visible = True
Sheets("Week5").Visible = True
Sheets("Week6").Visible = True
Sheets("Week7").Visible = True
Sheets("Week8").Visible = True
Sheets("Week9").Visible = True
Sheets("Week10").Visible = True
Sheets("Week11").Visible = True
Sheets("Week12").Visible = True
Sheets("Standings").Visible = True
Sheets(Array("Week1", "Week2", "Week3", "Week4", "Week5", "Week6",
"Week7", "Week8", _
"Week9", "Week10", "Week11", "Week12", "Standings")).Select
Sheets("Standings").Activate
SHEETS(ARRAY(\"WEEK1\", \"WEEK2\", \"WEEK3\", \"WEEK4\", \"WEEK5\",
\"WEEK6\", \"WEEK7\", \"WEEK8\", _
\"WEEK9\", \"WEEK10\", \"WEEK11\", \"WEEK12\",
\"STANDINGS\")).COPY BEFORE:=SHEETS(17)
Sheets("Standings").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets(Array("Week1", "Week2", "Week3", "Week4", "Week5", "Week6",
"Week7", "Week8", _
"Week9", "Week10", "Week11", "Week12", "Standings")).Select
Sheets("Standings").Activate
ActiveWindow.SelectedSheets.Visible = False
Sheets("Week1 (2)").Select
Range("A1").Select
End Sub

the bit it sights as a bug is in bold, anyone got any ideas and again a
big thanks in advance


and i kno about the 'befo' but that was my fault it should read
'before'
 
D

Don Guillett

WHY? Without testing, something like. (Shouldn't be necessary to make
visible to copy)
sub copysheetstoend()
for each sh in Sheets(Array("Week1", "Week2", "Week3", "Week4", _
"Week5", "Week6","Week7","Week8", _
"Week9", "Week10", "Week11", "Week12", "Standings"))
sh.copy after sheets(sheets.count)
next sh
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top