Save As referenced sheet hidden

SCRandby

New Member
Joined
Apr 24, 2005
Messages
12
My current Save As macro references my sheet named "Summary". If "Summary" is hidden, the macro needs to reference my sheet "Progress". I was wondering if anyone could help me. Thanks in advance!
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
Something like?
Code:
If Sheets("Summary").Visible = True Then
    'code for Summary sheet
Else
    'code for Progress sheet
End If

Regards,
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Something like this maybe:

<font face=tahoma><SPAN style="color:#00007F">Sub</SPAN> foo()
    <SPAN style="color:#00007F">If</SPAN> Sheets("Summary").Visible = <SPAN style="color:#00007F">False</SPAN> <SPAN style="color:#00007F">Then</SPAN>
        <SPAN style="color:#007F00">'   Do something</SPAN>
    Else: <SPAN style="color:#007F00">' Do something else</SPAN>
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Hope that helps,

Smitty
 

Watch MrExcel Video

Forum statistics

Threads
1,118,056
Messages
5,569,951
Members
412,299
Latest member
agentless
Top