LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default worksheets collection... find...

proposedname = "Sheet1"
for each sh in worksheets
if lcase(sh.name) = lcase(proposedname) then
msgbox "Name is a duplicate"
exit for
end if
Next
End Sub

or you can error trap.

--
Regards,
Tom Ogilvy

"mark kubicki" wrote in message
...
what function do i use to determine if a worksheet name already exists;

or should i use error trapping to catch an attempt at creating a redundant
worksheet name?




 
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
Find value in more than 100 worksheets at once Alamgir Farooq Excel Worksheet Functions 2 January 15th 08 02:47 PM
Find sum across all worksheets Ang2459 Excel Worksheet Functions 3 April 6th 06 07:25 PM
How can you find how many worksheets in a workbook? JonM4 Excel Discussion (Misc queries) 4 May 9th 05 09:46 PM
Using a collection class to implement mutliple find/replace strings in cells Bill Hertzing Excel Programming 2 February 18th 04 01:42 AM
How to find the type of Sheet in Excel.Workbook.sheets collection Raj[_7_] Excel Programming 3 December 9th 03 10:48 PM


All times are GMT +1. The time now is 11:39 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"