View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
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!