Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ambiguous name

  1. Nov 12, 2005 #1
    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?
  2. jcsd
  3. Nov 12, 2005 #2


    User Avatar
    Gold Member

    Can you elaborate?
  4. Nov 12, 2005 #3
    In the optionexplict i`ve defined my array as spd(n,n)

    Vb doesn`t like this and i don`t know why!
  5. Nov 17, 2005 #4


    User Avatar
    Gold Member

    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'.
  6. Nov 24, 2005 #5
    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
  7. Dec 2, 2005 #6
    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.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?