combobox autocomplete problem

RAYLWARD102

Well-known Member
Joined
May 27, 2010
Messages
529
I've got a combobox that I created this way:
Code:
Dim cb As Control
    Set cb = UserForm3.Controls.Add("Forms.combobox.1")
    With cb
        .Top = 10
        .Left = 5
        .Height = 40
        .Width = 500
        .Font.Size = 28
        .Name = "cb1"
        .AutoWordSelect = True
        For Each cell In spTY.Range("a2:a" & iRow).Cells
            .AddItem cell.Value
        Next cell
    End With

Ok.. I've created an on-screen keyboard using dynamically created buttons. The class module code behind each of those buttons reads:
Code:
UserForm3.Controls("cb1").Value = UserForm3.Controls("cb1").Value & CmdGroup5.Caption

It does put the letters from the buttons into the combobox, but the autocomplete is not working at all like how it would when you use the keyboard. Any idea's
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
its like I need to update the combobox some how. Just not sure how to. Normally the combobox detects the change but not when vba puts the characters into the combobox.... Seriously need help with this.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top