Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: Ambiguous name detected: obType_GotFocus

    I have 4 option buttons in a frame on my form. When i try to build the file i get the msg: Ambiguous name detected: obType_GotFocus
    below is the code,, whats going on? i have the object and select the GotFocus method from the top right drop down so i dont understand how the name is Ambiguous.

    Private Sub obType_GotFocus(Index As Integer)
    Form1.obType(Index).BackColor = RGB(128, 255, 128)
    Form1.obType(Index).ForeColor = RGB(0, 0, 0)
    End Sub

  2. #2
    Join Date
    Oct 2003
    the same code was duplicated later in the file

  3. #3
    Join Date
    Jun 2004
    Arizona, USA
    in your code, obType must be a control array, with at least 1 instance of the control on the form.

    WHen looking at the control properties in the IDE, the Index property will not be null - it will contain the zero-based index number of the control. This index number will then be used in the event subs for the control, to specify which control is being referenced.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts