Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Userform initialize combobox using Chr() function.

I've gotten some advice about how use the code below to populate ComboBox1
with letters instead of the numbers as below using the Chr() function, but I
can't make heads or tails of where to put it. I'd appreciate any help.

Private Sub UserForm_Initialize()
Dim iCtr As Long
For iCtr = 1 To 10
Me.ComboBox1.AddItem iCtr
Next iCtr
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userform initialize combobox using Chr() function.


Are you asking where to put Char() or the code?


--
I Maycotte
------------------------------------------------------------------------
I Maycotte's Profile: http://www.excelforum.com/member.php...o&userid=35604
View this thread: http://www.excelforum.com/showthread...hreadid=556175

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Userform initialize combobox using Chr() function.


Just where the Char() goes.
Thanks.
"I Maycotte" wrote:


Are you asking where to put Char() or the code?


--
I Maycotte
------------------------------------------------------------------------
I Maycotte's Profile: http://www.excelforum.com/member.php...o&userid=35604
View this thread: http://www.excelforum.com/showthread...hreadid=556175


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Userform initialize combobox using Chr() function.

Try
Dim N As Long
For N = Asc("A") To Asc("Z")
Me.ComboBox1.AddItem Chr(N)
Next N


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


"michaelberrier" wrote
in message
...
I've gotten some advice about how use the code below to
populate ComboBox1
with letters instead of the numbers as below using the Chr()
function, but I
can't make heads or tails of where to put it. I'd appreciate
any help.

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



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
Userform Initialize & combo box values michaelberrier Excel Discussion (Misc queries) 3 June 27th 06 04:35 PM
initialize userform, using a sub natanz[_2_] Excel Programming 11 November 22nd 05 05:30 AM
UserForm Initialize event doesn't fire reliably RB Smissaert Excel Programming 13 February 16th 05 01:39 AM
Qn: Define a variable in Initialize for Userform Michael Vaughan Excel Programming 4 August 21st 04 12:10 PM
Userform disappears when you try to initialize from a command button RPIJG[_60_] Excel Programming 8 July 2nd 04 08:14 PM


All times are GMT +1. The time now is 04:45 AM.

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

About Us

"It's about Microsoft Excel"