Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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
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
Excel needs the option to unhide multiple sheets at the same time Jason Excel Discussion (Misc queries) 4 August 4th 08 09:34 PM
Can't unhide left columns but can see them on print preview Columnless Excel Discussion (Misc queries) 3 July 30th 08 09:18 PM
unhide sheets Tom Excel Programming 4 February 1st 07 12:06 PM
Excel should let me unhide all sheets at once. Megaptera1969 Excel Worksheet Functions 2 September 28th 06 03:38 AM
Add sheets that are unhide Ron de Bruin Excel Programming 0 September 17th 03 10:50 PM


All times are GMT +1. The time now is 11:24 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"