Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
I have a macro that creates many temporary sheets and then deletes them. It
creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
Give this statement a try...
Worksheets(1).Select -- Rick (MVP - Excel) "Saucer Man" wrote in message ... I have a macro that creates many temporary sheets and then deletes them. It creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
You can run this macro.
Sub due() For i = 2 To ThisWorkbook.Sheets.Count If Sheets(i).Visible = False Then Sheets(i).Visible = True Next End Sub "Saucer Man" wrote: I have a macro that creates many temporary sheets and then deletes them. It creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
I read that post wrong. Disregard my previous suggestion.
"JLGWhiz" wrote in message ... You can run this macro. Sub due() For i = 2 To ThisWorkbook.Sheets.Count If Sheets(i).Visible = False Then Sheets(i).Visible = True Next End Sub "Saucer Man" wrote: I have a macro that creates many temporary sheets and then deletes them. It creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
That does bring the sheets out but I want the latest sheet to be the one
that is selected. Since the sheets are named Jan, Feb, Mar, etc., would the best way to do this be ... Sheets("Jan").Select Sheets(Month(Now)).Select "Rick Rothstein" wrote in message ... Give this statement a try... Worksheets(1).Select -- Rick (MVP - Excel) "Saucer Man" wrote in message ... I have a macro that creates many temporary sheets and then deletes them. It creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
That is almost right; however, the Month function returns a number, not
text. You should use this for your last statement... Sheets(MonthName(Month(Now), True)).Select as that will return the current month's abbreviated name (change True to False, or leave that argument out completely, and the MonthName function returns the fully spelled out month name). By the way, you might try just using this last statement by itself, without the Sheets("Jan") statement, and see if it brings out all the sheets directly. -- Rick (MVP - Excel) "Saucer Man" wrote in message ... That does bring the sheets out but I want the latest sheet to be the one that is selected. Since the sheets are named Jan, Feb, Mar, etc., would the best way to do this be ... Sheets("Jan").Select Sheets(Month(Now)).Select "Rick Rothstein" wrote in message ... Give this statement a try... Worksheets(1).Select -- Rick (MVP - Excel) "Saucer Man" wrote in message ... I have a macro that creates many temporary sheets and then deletes them. It creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unhide all sheets on the left of Excel
Thanks a lot. Leaving out the first statement did not bring out the rest of
the sheets. Thanks for the help everyone. "Rick Rothstein" wrote in message ... That is almost right; however, the Month function returns a number, not text. You should use this for your last statement... Sheets(MonthName(Month(Now), True)).Select as that will return the current month's abbreviated name (change True to False, or leave that argument out completely, and the MonthName function returns the fully spelled out month name). By the way, you might try just using this last statement by itself, without the Sheets("Jan") statement, and see if it brings out all the sheets directly. -- Rick (MVP - Excel) "Saucer Man" wrote in message ... That does bring the sheets out but I want the latest sheet to be the one that is selected. Since the sheets are named Jan, Feb, Mar, etc., would the best way to do this be ... Sheets("Jan").Select Sheets(Month(Now)).Select "Rick Rothstein" wrote in message ... Give this statement a try... Worksheets(1).Select -- Rick (MVP - Excel) "Saucer Man" wrote in message ... I have a macro that creates many temporary sheets and then deletes them. It creates so many that my original sheets get hidden on the left of excel. After the deletes, it doesn't move the sheets that are hidden on the left back into view. Is there a VBA statement that will accomplish this? -- Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel needs the option to unhide multiple sheets at the same time | Excel Discussion (Misc queries) | |||
Can't unhide left columns but can see them on print preview | Excel Discussion (Misc queries) | |||
unhide sheets | Excel Programming | |||
Excel should let me unhide all sheets at once. | Excel Worksheet Functions | |||
Add sheets that are unhide | Excel Programming |