Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
Exclaimation Point in Yellow Yeild Sign Compile error:
Ambiguous name detected: UpdateOffsetPositions. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
As a guess you have two procedures in the same module with the name
"UpdateOffsetPositions". -- HTH... Jim Thomlinson "MLS7181" wrote: Exclaimation Point in Yellow Yeild Sign Compile error: Ambiguous name detected: UpdateOffsetPositions. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
This usually means that two instances of the name are in scope. I've
had this when I created a variable as global and then again in a procedure. Use find to search for duplicate Dim statements of the same name |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
Are you sure about that... That kind of a scope issue will resolve itself
according to a heirarchy. For example you can dim a variable myVar as a Global and also dim myVar within a procedure and it will work just fine. Within the procedure where myVar is declared the local will supercede the global. Agreeably within a procedure you can not declare two varaibles with the same name, nor can you declare two globals with the same name in the same module. -- HTH... Jim Thomlinson "Zone" wrote: This usually means that two instances of the name are in scope. I've had this when I created a variable as global and then again in a procedure. Use find to search for duplicate Dim statements of the same name |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
Jim, I always use the Option Explicit. If I declare a local variable
with the same name as a global variable (including capitalization), I get this message. Gosh, am I wrong about this? James |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
I've never had any trouble with common local and global names (but I do try to
avoid that). Any chance you have multiple procedures using that same sub/function name? How about the module name? I wouldn't use a sub/function name for the module name, either. Zone wrote: Jim, I always use the Option Explicit. If I declare a local variable with the same name as a global variable (including capitalization), I get this message. Gosh, am I wrong about this? James -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
Dave is right and I am wrong. A local and global variable with the
same name will not cause the problem. But two procedures with the same name will cause the problem. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA-Error Message Assistance Needed
The declaration is valid and the scope expands outwards from the procedure to
the module to the project. That being said it is generaly poor coding practice to use the same name for a global and a local variable. -- HTH... Jim Thomlinson "Zone" wrote: Dave is right and I am wrong. A local and global variable with the same name will not cause the problem. But two procedures with the same name will cause the problem. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error message needed if incorrect Date Of Birth (DOB) entered | Excel Worksheet Functions | |||
#VALUE! error message help needed please | Excel Worksheet Functions | |||
VBA Assistance Needed | Excel Discussion (Misc queries) | |||
.dll error message help needed | Excel Programming | |||
Code assistance needed | Excel Programming |