#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Macros

I have recorded a macro that unhides a sheet from the existing workbook. But
when i run it now, it unhides but remains in the existing sheet. I want it to
take me to the sheet that has been unhidden.

Pls help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Macros

Sub qwerty()
Dim s As Worksheet
For Each s In Worksheets
If s.Visible = False Then
s.Visible = True
s.Activate
Else
End If
Next
End Sub

--
Gary''s Student - gsnu200839
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Macros

Hi

You need to activate the sheet like this once it's unhidden:

Sheets("Sheet1").Acitvate

Hopes this helps

--
Per

"Sri Harsha" skrev i meddelelsen
...
I have recorded a macro that unhides a sheet from the existing workbook.
But
when i run it now, it unhides but remains in the existing sheet. I want it
to
take me to the sheet that has been unhidden.

Pls help.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Macros

Hi,

Try this

With Sheets("Sheet1")
.Visible = True
.Select
End With

Mike

"Sri Harsha" wrote:

I have recorded a macro that unhides a sheet from the existing workbook. But
when i run it now, it unhides but remains in the existing sheet. I want it to
take me to the sheet that has been unhidden.

Pls help.

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
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros Brian Day Excel Programming 1 March 29th 07 11:20 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
convert lotus 123w macros to excel macros rpiescik Excel Programming 1 September 18th 04 01:35 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM


All times are GMT +1. The time now is 01:44 AM.

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"