Home

Consulting

Excel VBA

Legal

Links

Contact

About Us

Select A Sheet

'********************************************************************
'  http://www.KravatzInc.com    1-866-XLS-PROG
'
'  This code is copyrighted by Kravatz, Inc. (c) 2007 All Rights Reserved.
'  You may use this code as long as this message appears
'  There is no warranty made to the fitness or suitablilty of this code
'  and by using it you hold Kravatz, Inc. harmless for any damages
'  that may result from its use.  This code is supplied as is.
'  
'********************************************************************
Function SelectSheet(sh As String)
On Error Resume Next
    If Sheets(sh).Visible = False Then
        If Err = 9 Then
            SelectSheet = "Unknown"
            Exit Function
        End If
        
        Sheets(sh).Visible = True
    End If
    
    Sheets(sh).Select
    
End Function