Thread: UserForm specs
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default UserForm specs


Private Sub UserForm_Activate()
Dim aryValues As Variant

aryValues = Range("A1:A20")
Me.ComboBox1.List = aryValues
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"alex" wrote in message
...
On May 19, 7:33 am, Incidental wrote:
Hi Alex

The code below would be one way to do it.

Private Sub UserForm_Initialize()

TextBox1.Value = Format(Now, "YYYY - MM - DD")

End Sub

Hope this helps

Steve


Thanks Bob and Steve; it worked perfectly. While I've got your
attention...Do you know the best way to add a list to a combobox? I'm
currently using .AddItem, but with a long list, it's a bit tedious.

thanks again,
alex