Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 7
Default macro problem for a noob lol

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 befo=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'
  #2   Report Post  
Junior Member
 
Posts: 7
Default

Dont worry lol, i got it, it didnt like the number 17. wanted number 16 which i cant understand cos i didnt write the code lol

Quote:
Originally Posted by bouncebackability View Post
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'
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default macro problem for a noob lol


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


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bouncebackability" wrote in
message ...

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 BEFO=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'




--
bouncebackability


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Noob question letmeplay1977 Excel Worksheet Functions 2 October 5th 05 09:27 PM
Noob question Micro_pal New Users to Excel 2 September 4th 05 02:37 PM
Noob question Micro_pal Excel Discussion (Misc queries) 5 September 3rd 05 01:42 AM
nOOb formulas question patrick Excel Discussion (Misc queries) 1 March 8th 05 02:42 PM
Noob help Patrick Excel Worksheet Functions 3 March 6th 05 07:23 PM


All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"