Input Lag in ComboBox Value?

raven1124

New Member
Joined
Jun 13, 2017
Messages
29
Hello everyone,

Is there any possible way to prevent input lag in a combobox?

I am currently playing around two combobox and whenever I change the value of combobox1 from Item 1 to Item 2 (vice versa) then select combobox2, I notice that the previous value of combobox1 one goes back to the previous value selected then goes to the current value selected in a split second (noticeable enough for me).

Things to know:
- The object was created inside an excel, not inside a form
- It is an activex
- I tried [OFF/ON] screenupdating but the lag still persist
- I notice the said event whenever I click any object/cell that is not combobox1 (after changing the value)
- I tried switch(case) instead of "if" and got the same behavior (split second lag) in the combobox1.text

I'm just nitpicking but if there's a way to further improve this one, please let me know

Sharing the code for your reference:
Code:
Private Sub ComboBox1_Change()


    If Sheet1.ComboBox1.Text = "Item 1" Then
        
        Sheet1.ComboBox2.Clear
        
        With Sheet1.ComboBox2
        .AddItem "abcd"
        .AddItem "efgh"
        End With
    
    ElseIf Sheet1.ComboBox1.Text = "Item 2" Then
        
        Sheet1.ComboBox2.Clear
        
        With Sheet1.ComboBox2
        .AddItem "123"
        .AddItem "456"
        End With
    
    Else
    
    End If


End Sub
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Does Combobox2 also have a change procedure? If yes, does it change Combobox1? If yes, then each procedure may trigger a change in the the other combobox and both procedures run.
 
Upvote 0
No, it doesn't change anything in combobox1.

only combobox1 feeds the content of combobox2 depending on the choices initialized in combobox1

I tried comparing the lag between form controls and activex based on my findings, it didn't give me any inputlag for form controls. However, activeX has far more better features.
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,400
Members
449,156
Latest member
LSchleppi

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