Ambiguous and empty variable.

Ambiguous and empty variable.

Anonymous
Not applicable
236 Views
3 Replies
Message 1 of 4

Ambiguous and empty variable.

Anonymous
Not applicable
Why does calling a public sub give me this error? The sub is called "Resetlayer" and it is located in the "Layers" module. I used to be able to call just by Resetlayer. Also I have a Public variable that needs to be used by that same sub and when it gets there it is empty. Why does this happen? I am using AutoCAD 2004 VBA. On a XPsp2 machine. -- Thanks, David M. Gardner Change the DOT to reply.
0 Likes
237 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Sounds like you've got 2 Restlayer subs. From the help file: The identifier (an element of an expression that refers to a constant or variable) conflicts with another identifier or requires qualification. More than one object in the same scope may have elements with the same name. Qualify the element name by including the object name and a period. For example: object.property -- I love deadlines I like the whooshing sound they make as they fly by. "David M. Gardner" wrote in message news:4151bc85_1@newsprd01... Why does calling a public sub give me this error? The sub is called "Resetlayer" and it is located in the "Layers" module. I used to be able to call just by Resetlayer. Also I have a Public variable that needs to be used by that same sub and when it gets there it is empty. Why does this happen? I am using AutoCAD 2004 VBA. On a XPsp2 machine. -- Thanks, David M. Gardner Change the DOT to reply.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Yep, ResetLayer is for shure used in more than one places. Do a search in you code on "Reset Layer", you will find what is wrong. Gilles "Matt W" wrote in message news:4151bd94_3@newsprd01... > Sounds like you've got 2 Restlayer subs. > > From the help file: > > The identifier (an element of an expression that refers to a constant or > variable) conflicts with another identifier or requires qualification. > More than one object in the same scope may have elements with the same name. > Qualify the element name by including the object name and a period. For > example: object.property > > > > -- > I love deadlines > I like the whooshing sound they make as they fly by. > > "David M. Gardner" wrote in message > news:4151bc85_1@newsprd01... > Why does calling a public sub give me this error? > > The sub is called "Resetlayer" and it is located in the "Layers" module. > > I used to be able to call just by Resetlayer. > > Also I have a Public variable that needs to be used by that same sub and > when it gets there it is empty. Why does this happen? > > I am using AutoCAD 2004 VBA. On a XPsp2 machine. > > -- > > Thanks, > > David M. Gardner > Change the DOT to reply. > >
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks. I had it defined in something like 3 places. Along with the variable I was using. Now it all works good. -- Thanks, David M. Gardner Change the DOT to reply. "Gilles Plante" wrote in message news:4152caed$1_1@newsprd01... > Yep, ResetLayer is for shure used in more than one places. Do a search in > you code on "Reset Layer", you will find what is wrong. > > Gilles > > "Matt W" wrote in message > news:4151bd94_3@newsprd01... >> Sounds like you've got 2 Restlayer subs. >> >> From the help file: >> >> The identifier (an element of an expression that refers to a constant or >> variable) conflicts with another identifier or requires qualification. >> More than one object in the same scope may have elements with the same > name. >> Qualify the element name by including the object name and a period. For >> example: object.property >> >> >> >> -- >> I love deadlines >> I like the whooshing sound they make as they fly by. >> >> "David M. Gardner" wrote in message >> news:4151bc85_1@newsprd01... >> Why does calling a public sub give me this error? >> >> The sub is called "Resetlayer" and it is located in the "Layers" module. >> >> I used to be able to call just by Resetlayer. >> >> Also I have a Public variable that needs to be used by that same sub and >> when it gets there it is empty. Why does this happen? >> >> I am using AutoCAD 2004 VBA. On a XPsp2 machine. >> >> -- >> >> Thanks, >> >> David M. Gardner >> Change the DOT to reply. >> >> > >
0 Likes