+ Reply to Thread
Results 1 to 4 of 4

Userform initialize combobox using Chr() function.

  1. #1
    michaelberrier
    Guest

    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. #2
    Registered User
    Join Date
    06-20-2006
    Posts
    39
    Are you asking where to put Char() or the code?

  3. #3
    michaelberrier
    Guest

    Re: 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. #4
    Chip Pearson
    Guest

    Re: 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" <[email protected]> wrote
    in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1