PDA

View Full Version : Button to unhide sheets



davide1976
07-12-2008, 10:36 AM
Hello,

I have a .xls file with 1 unhide sheet and several hidden sheets, my aim is the following:

- the unhide sheet, called 'Menu', have different buttons that I'd like to
join to the hidden sheets and when I go backward the relevant sheets
have to return hidden automatically.

i.e.: the sheet 'Menu' has a button that is linked to the (hidden) sheet
called 'Goalscorers'. Could you pls. help me with the correct
macro/code?:help

Thanks in advance for your support.:bow:
Davide/Italy

Simon Lloyd
07-12-2008, 12:48 PM
use the Worksheet_Deactivate like this:

Private Sub Worksheet_Deactivate()
Me.Visible = xlSheetVeryHidden
End Sub
VeryHidden rather than Hidden because when a sheet is very hidden it cannot be made visible from the menubar only via VBA.