Please solve the error below

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pandu2007
    New Member
    • Mar 2008
    • 5

    Please solve the error below

    Hi all,

    I am getting an error for the below code.

    error: "'NewIndex' is not a member of 'System.Windows .Forms.ComboBox '."

    If Default_Renamed = True Then

    ListIndex = Me.cbDefault.Ne wIndex

    End If
  • jjvainav
    New Member
    • Feb 2008
    • 25

    #2
    This indicates that Me.cbDefault is a ComboBox and the property NewIndex doesn't exist for Me.cbDefault.

    I am not sure exactly what you are trying to do, but if you want to get the index for the selected item in the combobox, change it to:

    Code:
    If Default_Renamed = True Then
    				
           ListIndex = Me.cbDefault.SelectedIndex
    Originally posted by pandu2007
    Hi all,

    I am getting an error for the below code.

    error: "'NewIndex' is not a member of 'System.Windows .Forms.ComboBox '."

    If Default_Renamed = True Then

    ListIndex = Me.cbDefault.Ne wIndex

    End If

    Comment

    Working...