Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In my UserForm, I have a ComboBox and if in my sheet, sheet1, in my cells A1 until F1, I have a number, I want to see appeared in my comboBox: Column A Column B .... Column F Is it possible? Thank you Michel |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() In my UserForm, I have a ComboBox and if in my sheet, sheet1, in my cells A1 until F1, I have a number, I want to see appeared in my comboBox: Column A Column B ... Column F Is it possible? Yes. Put the following code with the UserForm. Change sheet name if needed. Private Sub UserForm_Activate() Dim iCt As Integer For iCt = 1 To 6 vData = Sheets("Sheet1").Cells(1, iCt) If Application.IsNumber(vData) = True Then _ ComboBox1.AddItem vData Next iCt End Sub HTH, Merjet |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using additem. You can't bind the data to the combobox using rowsource.
Private Sub Userform_Initialize() for i = 1 to 6 combobox1.AddItem Worksheets("sheet1").Cells(1,i) Next end sub or Private Sub Userform_Initialize() combobox1.List = Application.Transpose( _ Worksheets("sheet1").Range("A1:F1").Value) End sub -- Regards, Tom Ogilvy "Michel" wrote in message om... Hi, In my UserForm, I have a ComboBox and if in my sheet, sheet1, in my cells A1 until F1, I have a number, I want to see appeared in my comboBox: Column A Column B ... Column F Is it possible? Thank you Michel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Value From ComboBox On UserForm | Excel Discussion (Misc queries) | |||
ComboBox on a UserForm | Excel Worksheet Functions | |||
Trouble with a ComboBox on a UserForm | Excel Worksheet Functions | |||
Userform w/ComboBox | Excel Discussion (Misc queries) | |||
Userform ComboBox and TextBox help!!! | Excel Programming |