LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Is a sheet a worksheet?

Is there any better way (less code) to check if a sheet is a worksheet?

Function CheckIsWorksheet(strSheet As String) As Boolean

Dim sh As Object

For Each sh In ActiveWorkbook.Worksheets
If sh.Name = strSheet Then
CheckIsWorksheet = True
Exit Function
End If
Next sh

CheckIsWorksheet = False

End Function


RBS


 
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
Excel worksheet - Can I make changes in one sheet affect contents of other sheet? [email protected] Excel Discussion (Misc queries) 3 July 11th 06 03:34 PM
summary data sheet from worksheet to worksheet KKay Excel Worksheet Functions 1 May 21st 06 10:37 AM
Can I copy Everything in a worksheet to a new sheet EXCEPT the te buddyorliz Excel Worksheet Functions 1 March 22nd 06 09:13 AM
copy cell from one sheet of worksheet to another sheet Planetjim Excel Discussion (Misc queries) 1 January 10th 06 09:36 AM
Worksheet - Functions from sheet to sheet brietve Excel Discussion (Misc queries) 2 May 10th 05 10:23 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"