Hi all,
I want to entry some list to combo box from design, something like :
Sunday, Monday, etc.
But I cannot find 'List' property, like I found it in Visual Basic.
Please help me to solve this problem.
Thanks,
Resant
Hi all,
I want to entry some list to combo box from design, something like :
Sunday, Monday, etc.
But I cannot find 'List' property, like I found it in Visual Basic.
Please help me to solve this problem.
Thanks,
Resant
where is your combo box stored - is it on a custom form, or directly on
a worksheet. If on the worksheet, did it come from the forms toolbar
or the controls toolbar?
For a Userform:
Private Sub UserForm_Initialize()
v = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday")
ComboBox1.List = v
End Sub
On the worksheet
Sub ABC()
v = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday")
With ActiveSheet
' control toolbox combobox
.ComboBox1.List = v
' forms toolbar dropdown
.DropDowns("Drop Down 2").List = v
End With
End Sub
Incell dropdown (Data Validation)
Sub AddValidation()
Dim rng As Range
Set rng1 = Range("C9")
With rng1.Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, _
Formula1:= _
"Sunday, Monday, Tuesday, " & _
"Wednesday, Thursday, Friday, " & _
"Saturday"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub
--
Regards,
Tom Ogilvy
"Resant" wrote:
> Hi all,
> I want to entry some list to combo box from design, something like :
> Sunday, Monday, etc.
> But I cannot find 'List' property, like I found it in Visual Basic.
>
> Please help me to solve this problem.
>
> Thanks,
>
> Resant
>
>
I create combo box in a worksheet, using Control Toolbox.
I don't want to fill the list from macro, but from the properties
directly, just like VB.
Is it possible?
Thanks,
Resant
You can use the ListFill range property to set the data from the
worksheet, but there isn't a LIST item as in VB.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks