PDA

View Full Version : ambiguous name


zanazzi78
Nov12-05, 09:45 AM
To those who helped yesterday,again, thanks.

I have managed to resolve most of my problems, however, i have a new issue.

VB seemsto think that the names of my arrays are "ambiguous", WHY?

what do i need to do to resolve this new and fustrating problem?

DaveC426913
Nov12-05, 11:07 AM
Can you elaborate?

zanazzi78
Nov12-05, 01:12 PM
In the optionexplict i`ve defined my array as spd(n,n)

Vb doesn`t like this and i don`t know why!

DaveC426913
Nov17-05, 04:43 PM
In the optionexplict i`ve defined my array as spd(n,n)
Vb doesn`t like this and i don`t know why!
Have you defined n?

'Option Explicit' means you must explictly define every variable with a type. If you merely say a(n,n) that's not explicit.

You first need 'Dim n as integer'.

SaturnV
Nov24-05, 09:56 PM
Typically you can only dimension an array to either values (i.e. 4) or constants. If you have n defined as dim n as integer, it will (in my experience) kick the variable out. If you need to have it change size look at the redim function. Hope this helps

BobK
Dec2-05, 09:47 AM
An "ambiguous name detected" error is caused by a sub, function, or some other variable or array having the same name as the one you are currently trying to define.