#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Object Name


HI:

I'm trying to create a sub that would check for duplicate sheet ta
names and pop up a msg to the user.

Can anyone please tell me what the object name is for the Tab name???


thank

--
halem
-----------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...nfo&userid=993
View this thread: http://www.excelforum.com/showthread.php?threadid=26288

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Object Name

You can't have a duplicate, Excel won't allow it.

--

HTH

RP

"halem2" wrote in message
...

HI:

I'm trying to create a sub that would check for duplicate sheet tab
names and pop up a msg to the user.

Can anyone please tell me what the object name is for the Tab name???


thanks


--
halem2
------------------------------------------------------------------------
halem2's Profile:

http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=262888



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Object Name

Excel doesn't allow duplicate sheet tab names. Are you trying to assess a
proposed name?

Activesheet.Name will give you the sheet tab name.

--
Regards,
Tom Ogilvy

"halem2" wrote in message
...

HI:

I'm trying to create a sub that would check for duplicate sheet tab
names and pop up a msg to the user.

Can anyone please tell me what the object name is for the Tab name???


thanks


--
halem2
------------------------------------------------------------------------
halem2's Profile:

http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=262888



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Object Name

To check if a worksheet name exists, you can use...
'==============================================
Public Function SheetExists(sName) As Boolean
' Returns TRUE if sheet exists in the active workbook
Dim x As Object
On Error Resume Next
Set x = ActiveWorkbook.Sheets(sName)
If Err = 0 Then SheetExists = True _
Else SheetExists = False
End Function
'==============================================

HTH,
Gary Brown


-----Original Message-----

HI:

I'm trying to create a sub that would check for duplicate

sheet tab
names and pop up a msg to the user.

Can anyone please tell me what the object name is for the

Tab name???


thanks


--
halem2
----------------------------------------------------------

--------------
halem2's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=9930
View this thread:

http://www.excelforum.com/showthread...hreadid=262888

.

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
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 01:29 AM.

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

About Us

"It's about Microsoft Excel"