Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
michaelberrier
 
Posts: n/a
Default Userform Initialize & combo box values

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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
baxybaxy
 
Posts: n/a
Default Userform Initialize & combo box values


isn't there a char() function in vba?

can you add 64 to ictr and set the value to char(ictr)?


--
baxybaxy
------------------------------------------------------------------------
baxybaxy's Profile: http://www.excelforum.com/member.php...o&userid=35824
View this thread: http://www.excelforum.com/showthread...hreadid=556059

  #3   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default Userform Initialize & combo box values

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"
wrote in
message
...

isn't there a char() function in vba?

can you add 64 to ictr and set the value to char(ictr)?


--
baxybaxy
------------------------------------------------------------------------
baxybaxy's Profile:
http://www.excelforum.com/member.php...o&userid=35824
View this thread:
http://www.excelforum.com/showthread...hreadid=556059



  #4   Report Post  
Posted to microsoft.public.excel.misc
michaelberrier
 
Posts: n/a
Default Userform Initialize & combo box values

I've tried adding this several places, but I get a "permission denied"
error. Where would I put this?

Chip Pearson wrote:
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"
wrote in
message
...

isn't there a char() function in vba?

can you add 64 to ictr and set the value to char(ictr)?


--
baxybaxy
------------------------------------------------------------------------
baxybaxy's Profile:
http://www.excelforum.com/member.php...o&userid=35824
View this thread:
http://www.excelforum.com/showthread...hreadid=556059


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying cell values in a Userform michaelberrier Excel Discussion (Misc queries) 3 June 8th 06 05:24 PM
Userform and variables Jeff Excel Discussion (Misc queries) 1 May 24th 06 02:20 PM
Userform for displaying values from a row jgmiddel Excel Discussion (Misc queries) 0 April 25th 06 09:00 PM
UserForm and combo box to another sheet Nigel Excel Discussion (Misc queries) 0 April 29th 05 09:41 AM
Second serie doesn't use X-as values JackRnl Charts and Charting in Excel 1 January 20th 05 01:04 AM


All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"