jimmyhendix
New Member
- Joined
- Jan 4, 2010
- Messages
- 18
Hi,
This is a very basic question, but i have been struggling for hours, so I must ask.
I I trying to simply fill a combobox on a userform from a named range on a sheet, I want to populate the combobox as soon as the userform starts. (I launch the userform from a button on the sheet) Where must I place the code? and will this code work?
I am very new to vba, so please excuse my ignorance,
any help would be greatly appreciated
regards
jim
This is a very basic question, but i have been struggling for hours, so I must ask.
I I trying to simply fill a combobox on a userform from a named range on a sheet, I want to populate the combobox as soon as the userform starts. (I launch the userform from a button on the sheet) Where must I place the code? and will this code work?
Code:
Sub Button1_Click()
Set UserForm1.combobox1.List = Sheets("Sheet1").Range("MyRange")
UserForm1.Show
End Sub
I am very new to vba, so please excuse my ignorance,
any help would be greatly appreciated
regards
jim