Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hid a sheet in Excel 2003 Need to unhide it in Excel 2007 | New Users to Excel | |||
macro to unhide a sheet | Excel Discussion (Misc queries) | |||
Hide / Unhide Sheet Tabs Excel 2007 | Excel Discussion (Misc queries) | |||
How to hide/unhide sheet Tabs in Excel 2007? | Excel Worksheet Functions | |||
HELP!! Unhide Sheet with Macro and focus on other sheet | Excel Discussion (Misc queries) |