Hi,
I've attached an xls that has a rudimentary "month" pulldown. The Code is in Sheet 1 Code and in a Userform (Userform1).
This works by dblclicking $A$1 and returns the value of the month selected to same.
Just to get the idea. This is the code:
Sheet 1:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target(1, 1).Address = "$A$1" Then
Cancel = True
UserForm1.Show
End If
End Sub[/vba]
UserForm1:
[vba]
Private Sub ComboBox1_Click()
Unload UserForm1
End Sub
Private Sub ComboBox1_AfterUpdate()
Dim Month As String
Month = ComboBox1.Value
ActiveWorkbook.ActiveSheet.Cells(1, 1).Value = Month
End Sub
Private Sub Userform_Initialize()
Dim Months As Variant
ReDim Months(12)
Months = Array("January", "February", "March", "April", _
"May", "June", "July", "August", "September", "October", "November", "December")
ComboBox1.ColumnCount = 1
ComboBox1.List() = Months
End Sub
The UserForm only has one Control, ComboBox1
HTH.
Petri
Attachment 11188