Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very strange compile error 1

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
GB
When I try and make my project I get an error:

Ambiguous Name Detected: ~

I then do a text serach throughout my project only to find that there is no such tilde!

Does the tilde have some other special meaning??

elziko
 
I believe you are using a reserved name (like dim I think) as a name in your project.
 
Thanks, but when you try and do something like:

Privete Sub Print() OR
Dim Print as String

then the auto syntax check gives an error (the line goes red).

My error happens when you have, for example:

Dim smells As IntegerAND
Private Sub smells()

where you use the same name for a procedure and a vaiable. The thing is I do not have a single tilde in my whole project!:-V

elziko
 
I've never seen that error before when compiling so I'm just guessing here, but maybe one of the project files is corrupt. Try creating a new project and copy/paste the code into the new project and then try to recompile it. - Jeff Marler B-)
 
Ambiguos name detected is the error that you ussully get when you compile a project in which you have:

1. duplicate names for the variables inside the same scope(the most susceptible are the public ones)

2. duplicate names for functions inside modules and forms. I am almost sure you have something like this in your project.

Hope this helps,s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
BurtanI,
Yes, you are correct in your definition of the error, but for a normal procedure name and/or variable name, the compiler will tell you the name of the method/attribute in question. I've seen that error before and it is easily corrected . . . what I have not seen is when the system questions the ~ (tilde) function in VB.
- Jeff Marler B-)
 
Jeff,

you were spot on. I copied everything form one user control into a new one and it was fine. Had to redefine all my procedure attributes but you cant have it all:)
If you don't know whats wrong destroy it and start again. It seems to work too often!

elziko
 
Glad to hear that it worked . . . I guess my post-mortem assessment would be that something somewhere got corrupted. - Jeff Marler B-)
 
:-( Oh dear, its happened again. I think its something to do with me compiling my project or remaking some of the .dlls that my project refers to. Back to the destrying board.

elziko
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top