|
-
Jul 2nd, 2010, 01:10 PM
#12
New Member
Not Resolved
I know this thread title says, resolved, but it looks like it was resolved by using different code, not by finding the root cause.
I think I am having a similar same problem. I am running VBA for Excel 2007, although the files in question are saved as 97-2003 format.
I have two identical pieces of code in two different excel files, one was copied from the other. In the code I use the "Format" function to convert a number to a string without the leading placeholder for sign.
In the original file, this macro runs without any problems. In the copied version, VBA doesn't want to recognize the "Format" function. I get the following:
Compile error:
Wrong number of arguments or invalid property assignment
When I look at the code, the "F" in format has been forced back to lower case, whereas in the original file it is forced to upper case indicating a recognized function.
Both files have the same references selected.
Anyone know why VBA would recognize the "Format" function in one excel file and not another?
For reference, the line of code in question is:
Code:
If format(CSsht(CStar, 1)) = format(CSsht(CStar + 1, 1)) Then: GoTo FoundMatch
Thanks for any help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|