Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim MyName As String
Dim MySheet As Object Set MySheet = ActiveWorkbook.ActiveSheet Dim Sheet As Object On Error GoTo btnRename_Err: ....(Other Code) NamingRoutine: Else For Each Sheet In ActiveWorkbook.Sheets If MyName = Sheet.Name Then MsgBox "This Sheet Name is already in use. Please pick another name.", , "This Worksheet Name is in Use." Next Sheet GoTo NamingRoutine: .....(Other Code) This Code fails if MyName and Sheet.Name are the same except for capitalization. For Example: If MyName = Hello and Sheet.Name = hello, the code fails. It generates the MsgBox "This Sheet Name..." and loops endlessly. Can I convert MyName and Sheet.Name to upper case, then Compare? Other Suggestions? Thank you. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Case Sensitive Compare, Lookup, etc???? | Excel Discussion (Misc queries) | |||
Compare Upper and Lower Case | Excel Discussion (Misc queries) | |||
How do I change the case from all caps to proper for names I have in columns E, F, G? | Excel Discussion (Misc queries) | |||
Capital letters in names written by lower case | Excel Programming | |||
excel case changes on a column of first names | Excel Discussion (Misc queries) |