Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your understanding (and code) appears to be correct. No offense, but
based on my own embarrassing experiences, perhaps your eyes are playing a trick on you - maybe with spaces vs. underscores or such. To slay this beast it won't hurt (during development) to add this just before your Match: debug.print "<" & activesheet.name & "" ' use some unique delimiter This kind of thing may be useful on something down the road anyway; from time to time it shows me I need to trim something. On Wed, 20 Aug 2003 11:37:28 +0100, "Scott" wrote: Hi, I'm having a little problem with this code and I haven't a clue what the problem is. This code checks to see if the active sheet is listed in the array, if it is then it exits the sub. My problem is that this works fine in a new workbook, even if the case is different. But the workbook in which I try to run this code works fine if the case is the same, but if the case is different the sheet is not found and the massage "Sheet Not Found" is displayed. I don't think there's anything special about this workbook, so this is really confusing me. Has anyone got any ideas to what the problem is? res = Application.Match(ActiveSheet.Name, Array("sheet1", "sheet2", "sheet3"), 0) If Not IsError(res) Then Msgbox "Sheet Found" Exit Sub End If Msgbox "Sheet Not Found" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing file in all upper case to upper and lower case | Excel Discussion (Misc queries) | |||
upper\lower case formula problem | Excel Discussion (Misc queries) | |||
Change from mixed caps and upper lower to all upper lower case | Excel Worksheet Functions | |||
How do I convert all upper case excel sheet into upper and lower . | Excel Discussion (Misc queries) | |||
Upper & Lower case problem in VBA | Excel Discussion (Misc queries) |