duugg
11-22-2010, 07:09 AM
Hello All,
I have this code here given to me by fumei (thanks again fumei!)
Option Explicit
Private Sub Document_Open()
Dim yadda() As String
Dim j As Long
yadda = Split("California,Colorado,Connecticut", ",")
For j = 0 To UBound(yadda())
ComboBox1.AddItem yadda(j)
Next
End Sub
As this ActiveX Control box currently stands, once I tab to this field, I am able to type any text I desire and then tab to the next field, an ability which I do NOT want.
I would like to know if there is additional code anyone can provide within the existing code above that restricts the data selection to ONLY "California", "Colorado" or "Connecticut".
Can this be done?
Thanks much :yes
I have this code here given to me by fumei (thanks again fumei!)
Option Explicit
Private Sub Document_Open()
Dim yadda() As String
Dim j As Long
yadda = Split("California,Colorado,Connecticut", ",")
For j = 0 To UBound(yadda())
ComboBox1.AddItem yadda(j)
Next
End Sub
As this ActiveX Control box currently stands, once I tab to this field, I am able to type any text I desire and then tab to the next field, an ability which I do NOT want.
I would like to know if there is additional code anyone can provide within the existing code above that restricts the data selection to ONLY "California", "Colorado" or "Connecticut".
Can this be done?
Thanks much :yes