View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Helen Helen is offline
external usenet poster
 
Posts: 18
Default create button that can hide/unhide sheets and hyperlink...

Hi Norman,

You're helping me a lot today!!

If I want to unhide/hide more than one sheet, how do I go about doing that?
Some kind of array as well...?

Thanks,

Helen


"Norman Jones" wrote in message
...
Hi Helen,

create a button that can hide/unhide sheets


Try:

'============
Private Sub CommandButton1_Click()
Dim SH As Worksheet

Set SH = ActiveWorkbook.Sheets("Sheet3") '<<=== CHANGE
SH.Visible = Not SH.Visible
End Sub
'<<============

create a button that can takes the user to another place in the work book
(even if that sheet is hidden)


Try:

'============
Sub Tester2()
Dim SH As Worksheet
Dim rng As Range

Set SH = ActiveWorkbook.Sheets("Sheet2") '<<=== CHANGE
Set rng = SH.Range("A10") '<<=== CHANGE

SH.Visible = True
Application.Goto rng

End Sub
'<<============

---
Regards,
Norman



"Helen" wrote in message
...
Hi, I'm trying to figure out two things;

create a button that can hide/unhide sheets

create a button that can takes the user to another place in the work book
(even if that sheet is hidden) - maybe this is a hyperlink of sorts?

(I know how to create the buttons, just need help big time(!) with the
code)

Thanks!

Helen