Why does the date change from "January 07" to a numercial value of "39038 "
Tom,
I get an error in this line:
Private Sub UserForm_Initialize()
With Sheet1
Me.ComboBox1.RowSource = ""
for each cell in .Range("B17:B28")
me.combobox1.AddItem = cell.Text' <======= Expected Function or Variable
Next
End With
me.combobox1.ListIndex = 0 ' or whatever you want
End Sub
ALSO
Was this:
Private Sub Combobox1_Click()
with Sheet1
.Range("F11").Value = Me.Combobox1.Value
End With
End Sub
Suppose to be:
Private Sub Combobox1_Click()
with Sheet1
.Range("B17:B28").Value = Me.Combobox1.Value
End With
End Sub
??
"Tom Ogilvy" wrote in message
...
I would not use a rowsource or a controlsource with dates, but
Private Sub UserForm_Initialize()
With Sheet1
Me.ComboBox1.RowSource = ""
for each cell in .Range("B17:B28")
me.combobox1.AddItem = cell.Text
Next
End With
me.combobox1.ListIndex = 0 ' or whatever you want
End Sub
Private Sub Combobox1_Click()
with Sheet1
.Range("F11").Value = Me.Combobox1.Value
End With
End Sub
--
Regards,
Tom Ogilvy
"Corey" wrote in message
...
Private Sub UserForm_Initialize()
With Sheet1
Me.ComboBox1.RowSource = "B17:B28"
Me.ComboBox1.Text = Format(Me.ComboBox1.Text, "mmmm yy")
End With
End Sub
|