Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB ListBox
In your userform (double-click the form), paste the following code to
"UserForm_Activate". Assume that your listbox is called "ListBox1". Private Sub UserForm_Activate() Dim tmp As Integer With ListBox1 .Clear For tmp = 1 To 12 .AddItem Format(DateSerial(2006, tmp, 1), "mmmm") Next End With End Sub Regards, Edwin Tam http://www.vonixx.com "joakl" wrote: I've never used user forms as part of a macro. I am trying to create a list box in a user form but can't figure how to enter the list of months. I have created the user form and inserted the list box, just can't type the months in...any answers? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
avoiding duplicates in listbox (added from another listbox) | Excel Programming | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
Multicolumn Listbox and ordinary listbox | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming |