LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Upper/Lower case problem

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
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
Changing file in all upper case to upper and lower case Sagit Excel Discussion (Misc queries) 15 May 30th 07 06:08 AM
upper\lower case formula problem shakey1181 Excel Discussion (Misc queries) 0 November 21st 06 10:14 AM
Change from mixed caps and upper lower to all upper lower case Fish''s Mermaid Excel Worksheet Functions 3 October 13th 06 02:15 PM
How do I convert all upper case excel sheet into upper and lower . DebDay Excel Discussion (Misc queries) 1 March 9th 05 08:31 PM
Upper & Lower case problem in VBA Rob Excel Discussion (Misc queries) 2 February 10th 05 07:46 AM


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