Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Test for membership in sheets collection

See my second point in the response I gave to Dave's posting.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
Function SheetExists(SName As String, _
Optional ByVal wb As Workbook) As Boolean
'Chip Pearson
On Error Resume Next
If wb Is Nothing Then Set wb = ThisWorkbook
SheetExists = CBool(Len(wb.Sheets(SName).Name))
End Function

--
Gary''s Student - gsnu200845


"Tom" wrote:

I want to test the worksheets collection for a specific worksheet name.
True/False response is what I'm loking for.
Suggestions?


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
Code Module in Sheets Collection CG[_4_] Excel Programming 5 June 3rd 08 08:53 PM
Loading Sheets into a Customer Collection ExcelMonkey Excel Programming 2 May 26th 08 06:24 PM
VSTO: Sheets collection a 1-based array(?!?!?) Bob Sullentrup Excel Programming 0 November 10th 05 04:10 PM
creating a collection of Sheets references Eric[_27_] Excel Programming 1 February 6th 05 01:20 PM
collection of sheets mark Excel Programming 6 February 2nd 05 11:38 PM


All times are GMT +1. The time now is 10:25 PM.

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"