Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Macro to unhide a sheet Excel 2007

When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to unhide a sheet Excel 2007

Attach this macro to your button

Sub Show_Enrollment 1_Tab_Macro()

Sheets("Enrollment 1").Visible = True

End Sub


If you want to cursor to go to the Enrollment 1 and into say cell A1 use this:

Sub Show_Enrollment 1_Tab_Macro()

Sheets("Enrollment 1").Visible = True
Sheets("Enrollment 1").Select
Range("A!").Select

End Sub


Hope this works out for your needs.


--
~TK~


"Paula" wrote:

When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to unhide a sheet Excel 2007

Sorry I meant to say "Enrollment 2", and not 1, in the formulas.


--
~TK~


"Paula" wrote:

When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro to unhide a sheet Excel 2007

On 15 Oct, 21:05, Paula wrote:
When in worksheet "Enrollment 1", I have a button to click. *I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". *Thanks!


Hi Paula

Try this

Private Sub Reveal()
With ThisWorkbook
If Worksheets("Enrollment 2").Visible = False Then
Worksheets("Enrollment 2").Visible = True
Worksheets("Enrollment 2").Activate
End If
End With
End Sub

HTH Jeanette
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Macro to unhide a sheet Excel 2007

Hi-I tried that, but not working. I am sure it is user error, but cannot
figure out why not working. Here is the macro:

Sub Macro13()
Sub Show_Enrollment 2_Tab_Macro()

Sheets("Enrollment 2").Visible = True

End Sub

Thanks!

"tkmaster3" wrote:

Sorry I meant to say "Enrollment 2", and not 1, in the formulas.


--
~TK~


"Paula" wrote:

When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Macro to unhide a sheet Excel 2007

is the code in a standard MODULE?
put
OPTION EXPLICIT
at the very top of the module, so its the very first line

if the code isn't in a module, then cut/paste into one. With the procedure
selected, step through is with the F8 key

are there any error messages?

"Paula" wrote:

Hi-I tried that, but not working. I am sure it is user error, but cannot
figure out why not working. Here is the macro:

Sub Macro13()
Sub Show_Enrollment 2_Tab_Macro()

Sheets("Enrollment 2").Visible = True

End Sub

Thanks!

"tkmaster3" wrote:

Sorry I meant to say "Enrollment 2", and not 1, in the formulas.


--
~TK~


"Paula" wrote:

When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Macro to unhide a sheet Excel 2007

I tried that, but did not work. It opens Enollment 2 if not hidden, but will
not open hidden sheet. I do not know what a "Satndard Module" is. I fo to
'View Macros', they are all listed there, I start a new one. Please don't
give up on me.
Paula

"Patrick Molloy" wrote:

is the code in a standard MODULE?
put
OPTION EXPLICIT
at the very top of the module, so its the very first line

if the code isn't in a module, then cut/paste into one. With the procedure
selected, step through is with the F8 key

are there any error messages?

"Paula" wrote:

Hi-I tried that, but not working. I am sure it is user error, but cannot
figure out why not working. Here is the macro:

Sub Macro13()
Sub Show_Enrollment 2_Tab_Macro()

Sheets("Enrollment 2").Visible = True

End Sub

Thanks!

"tkmaster3" wrote:

Sorry I meant to say "Enrollment 2", and not 1, in the formulas.


--
~TK~


"Paula" wrote:

When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Macro to unhide a sheet Excel 2007

I tried this-won't work. Please treat me like the moron I am. Tell me how
to do it as if I have never done a macro before. I am missing something.
Thanks! Paula

"Jeanette" wrote:

On 15 Oct, 21:05, Paula wrote:
When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!


Hi Paula

Try this

Private Sub Reveal()
With ThisWorkbook
If Worksheets("Enrollment 2").Visible = False Then
Worksheets("Enrollment 2").Visible = True
Worksheets("Enrollment 2").Activate
End If
End With
End Sub

HTH Jeanette
.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro to unhide a sheet Excel 2007

I think you're going to have to share what went wrong...

Paula wrote:

I tried this-won't work. Please treat me like the moron I am. Tell me how
to do it as if I have never done a macro before. I am missing something.
Thanks! Paula

"Jeanette" wrote:

On 15 Oct, 21:05, Paula wrote:
When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!


Hi Paula

Try this

Private Sub Reveal()
With ThisWorkbook
If Worksheets("Enrollment 2").Visible = False Then
Worksheets("Enrollment 2").Visible = True
Worksheets("Enrollment 2").Activate
End If
End With
End Sub

HTH Jeanette
.


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Macro to unhide a sheet Excel 2007

I figured it out-I had a Hyperlink attached to the button I had to remove,
then it worked. Thanks ALL!!

"Dave Peterson" wrote:

I think you're going to have to share what went wrong...

Paula wrote:

I tried this-won't work. Please treat me like the moron I am. Tell me how
to do it as if I have never done a macro before. I am missing something.
Thanks! Paula

"Jeanette" wrote:

On 15 Oct, 21:05, Paula wrote:
When in worksheet "Enrollment 1", I have a button to click. I need to assign
a macro to it (i know how to do that part) to open the next hidden worksheet
"Enrollment 2", but I cannot find the correct macro to say open or activate
"Enrollment 2". Thanks!

Hi Paula

Try this

Private Sub Reveal()
With ThisWorkbook
If Worksheets("Enrollment 2").Visible = False Then
Worksheets("Enrollment 2").Visible = True
Worksheets("Enrollment 2").Activate
End If
End With
End Sub

HTH Jeanette
.


--

Dave Peterson
.

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
Hid a sheet in Excel 2003 Need to unhide it in Excel 2007 Lid7sgi New Users to Excel 1 January 22nd 10 06:01 PM
macro to unhide a sheet Bill_S Excel Discussion (Misc queries) 1 April 10th 08 05:27 PM
Hide / Unhide Sheet Tabs Excel 2007 Phil A. Excel Discussion (Misc queries) 2 October 19th 07 08:25 PM
How to hide/unhide sheet Tabs in Excel 2007? Smibes Excel Worksheet Functions 10 March 28th 07 02:45 AM
HELP!! Unhide Sheet with Macro and focus on other sheet [email protected] Excel Discussion (Misc queries) 2 May 23rd 06 07:17 PM


All times are GMT +1. The time now is 09:54 PM.

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"