View Single Post
 
Old 05-25-2011, 03:16 AM
ilkks ilkks is offline Windows Vista Office 2007
Novice
 
Join Date: May 2011
Posts: 23
ilkks is on a distinguished road
Default

Thank you for your reply macropod.

I can see and choose all values in the UserForm/ComboBox, but when I press cmdOK_Click-button it says:

Code:
Run-time error: 5941
The requested member of the collection does not exists.
The sub called by my MacroButton is called FoodDropDownList, and it is like this:

Code:
Sub FoodDropDownList()

    frmTesti.Show
    
End Sub
And therefore here is the code I tested by your instructions which makes the run-time error:

Code:
Private Sub cmdOK_Click()

Selection.Fields(1).Code.Text = "MACROBUTTON FoodDropDownList" & cboFood.Value
Unload Me

End Sub
Reply With Quote