Userform Initialize & combo box values

  • Thread starter Thread starter michaelberrier
  • Start date Start date
M

michaelberrier

I have the following code for populating a combobox with numbers 1-10.
Is there a way to change it to display letters instead of numbers?

Private Sub UserForm_Initialize()
Dim iCtr As Long
For iCtr = 1 To 10
Me.ComboBox1.AddItem iCtr
Next iCtr
End Sub

Thanks to all.
 
isn't there a char() function in vba?

can you add 64 to ictr and set the value to char(ictr)?
 
There is the Chr function that returns a string based on the
ASCII value passed in. E.g.,

Debug.Print Chr(48)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"baxybaxy"
message
news:[email protected]...
 
I've tried adding this several places, but I get a "permission denied"
error. Where would I put this?
 
Back
Top