Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with - sign in sheet name??
I have code that will get a range method failed error when trying to
execute the statement: x=range(s & i) where s="Brazil-008.ord" and i is any value. The Brazil-008.ord tab (worksheet) does exist. If I change the salur os s and the name of the worksheet so that it does not contain the minus sign it works great. I have had used a worksheet named Brazil-008.ord in another set of macros which happens to have the same statement and it works fine. Any ideas what could be causing this? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with - sign in sheet name??
A sheet name cannot contain a minus sign. I suspect in the other workbook the minus sign was not part of a string name but was interpreted as a real minus sign and you were perfrom a subtraction. for example A = 5 B = 3 A - B = 2 Which is not the same as the string "A - B" You code has double quotes around the variable s="Brazil-008.ord" which makes it a string. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=206229 http://www.thecodecage.com/forumz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Condition formats have $ sign problem copying | Excel Worksheet Functions | |||
did you ever make a sign in sheet | Excel Discussion (Misc queries) | |||
Number / Pound sign problem | Excel Programming | |||
I have a sign up sheet and the Row line begins with the #3!!?? | Excel Discussion (Misc queries) | |||
Problem with changing cell contents with $ sign | Excel Worksheet Functions |