Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Bringing up the Unhide Sheet list via macro

Is it possible to bring up the Sheet Unhide window using a macro?
Basically, there may be several sheets that are hidden. I want this macro
to bring up the Sheets Unhide window so that I can then select the sheet
that I want to unhide. When I know the sheet name, I know I can unhide that
sheet with the following:

Sheets("SheetName").Visible = True

But if you don't know the sheet name and you just want to bring up a list,
you would normally have to click on Format-Sheet-Unhide.
Can this been done using a macro?

Thanks,
Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Bringing up the Unhide Sheet list via macro

Try this:


Sub Test()

Dim bDialogResult As Boolean

bDialogResult = bShowDialog(xlDialogWorkbookUnhide)

MsgBox bDialogResult

End Sub


Function bShowDialog(iDialog As Integer) As Boolean

Dim oDialog As Dialog

Set oDialog = Application.Dialogs(iDialog)

bShowDialog = oDialog.Show

End Function


If needed you can use the result of the dialog; that is if a sheet was
indeed unhidden or if the
dialog was cancelled. Note that you can use the function for other dialogs
as well.


RBS


"PCLIVE" wrote in message
...
Is it possible to bring up the Sheet Unhide window using a macro?
Basically, there may be several sheets that are hidden. I want this macro
to bring up the Sheets Unhide window so that I can then select the sheet
that I want to unhide. When I know the sheet name, I know I can unhide
that sheet with the following:

Sheets("SheetName").Visible = True

But if you don't know the sheet name and you just want to bring up a list,
you would normally have to click on Format-Sheet-Unhide.
Can this been done using a macro?

Thanks,
Paul


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Bringing up the Unhide Sheet list via macro

Actually, I am not sure the funtion has any purpose.
Maybe this is just simpler:

Sub test()

Dim bDialogResult As Boolean

bDialogResult = Application.Dialogs(xlDialogWorkbookUnhide).Show

MsgBox bDialogResult

End Sub

The nice thing is that typing the bracket after Dialogs, will bring up all
the possible dialogs.
Of course you may not be interested in the result of the dialog and then you
could just do:
Application.Dialogs(xlDialogWorkbookUnhide).Show


RBS


"RB Smissaert" wrote in message
...
Try this:


Sub Test()

Dim bDialogResult As Boolean

bDialogResult = bShowDialog(xlDialogWorkbookUnhide)

MsgBox bDialogResult

End Sub


Function bShowDialog(iDialog As Integer) As Boolean

Dim oDialog As Dialog

Set oDialog = Application.Dialogs(iDialog)

bShowDialog = oDialog.Show

End Function


If needed you can use the result of the dialog; that is if a sheet was
indeed unhidden or if the
dialog was cancelled. Note that you can use the function for other dialogs
as well.


RBS


"PCLIVE" wrote in message
...
Is it possible to bring up the Sheet Unhide window using a macro?
Basically, there may be several sheets that are hidden. I want this
macro to bring up the Sheets Unhide window so that I can then select the
sheet that I want to unhide. When I know the sheet name, I know I can
unhide that sheet with the following:

Sheets("SheetName").Visible = True

But if you don't know the sheet name and you just want to bring up a
list, you would normally have to click on Format-Sheet-Unhide.
Can this been done using a macro?

Thanks,
Paul



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Bringing up the Unhide Sheet list via macro

I didn't really need the message box, but it works.

Thanks.
Paul

"RB Smissaert" wrote in message
...
Actually, I am not sure the funtion has any purpose.
Maybe this is just simpler:

Sub test()

Dim bDialogResult As Boolean

bDialogResult = Application.Dialogs(xlDialogWorkbookUnhide).Show

MsgBox bDialogResult

End Sub

The nice thing is that typing the bracket after Dialogs, will bring up all
the possible dialogs.
Of course you may not be interested in the result of the dialog and then
you could just do:
Application.Dialogs(xlDialogWorkbookUnhide).Show


RBS


"RB Smissaert" wrote in message
...
Try this:


Sub Test()

Dim bDialogResult As Boolean

bDialogResult = bShowDialog(xlDialogWorkbookUnhide)

MsgBox bDialogResult

End Sub


Function bShowDialog(iDialog As Integer) As Boolean

Dim oDialog As Dialog

Set oDialog = Application.Dialogs(iDialog)

bShowDialog = oDialog.Show

End Function


If needed you can use the result of the dialog; that is if a sheet was
indeed unhidden or if the
dialog was cancelled. Note that you can use the function for other
dialogs as well.


RBS


"PCLIVE" wrote in message
...
Is it possible to bring up the Sheet Unhide window using a macro?
Basically, there may be several sheets that are hidden. I want this
macro to bring up the Sheets Unhide window so that I can then select the
sheet that I want to unhide. When I know the sheet name, I know I can
unhide that sheet with the following:

Sheets("SheetName").Visible = True

But if you don't know the sheet name and you just want to bring up a
list, you would normally have to click on Format-Sheet-Unhide.
Can this been done using a macro?

Thanks,
Paul





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
macro to unhide a sheet Bill_S Excel Discussion (Misc queries) 1 April 10th 08 05:27 PM
Bringing data in one sheet Nad Excel Discussion (Misc queries) 0 June 26th 06 01:19 PM
HELP!! Unhide Sheet with Macro and focus on other sheet [email protected] Excel Discussion (Misc queries) 2 May 23rd 06 07:17 PM
Hide/unhide sheet macro based on cell calculation Greg Fisher Excel Programming 3 May 26th 05 05:58 PM
unhide sheet using macro David Berry Excel Programming 0 September 29th 03 06:39 PM


All times are GMT +1. The time now is 08:45 AM.

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

About Us

"It's about Microsoft Excel"