Auto-fill Combo Box

smit3446

New Member
Joined
Nov 16, 2015
Messages
44
I have an auto-fill combo box that is working well with one exception. The value in the combo box has a linked cell destination that is changing/populating with whatever is in the combo box in "real-time".

This works as expected, but the file is massive, and there are many VLOOKUPS running off the cell destination, so with each "changed" value in the auto-fill combo box, the file has to run its hundreds of VLOOKUPS and slows down the file (and my computer!) considerably.

My question is this - how can I retain the auto-fill properties of this combo box but not have the target cell populate until a user hits "enter" or something similar? I don't want that target cell populated until the desired selection from the combo box is actually selected.

Hope this makes sense, thanks in advance!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Consider setting calculations to manual
That allows you to choose when formulas are recalculated

 
Upvote 0
My question is this - how can I retain the auto-fill properties of this combo box but not have the target cell populate until a user hits "enter" or something similar? I don't want that target cell populated until the desired selection from the combo box is actually selected.

Try this:
1. Clear the Linkedcell property.
2. Use this code (change ComboBox1 and the target cell Range("A1") to suit)
The target cell will be populated only when you hit "enter".
VBA Code:
Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
        Select Case KeyCode
        Case 13 'Enter
                Range("A1").Value = ComboBox1.Value
        Case 27, 9 'esc 'tab
                Range("A1").Activate
        Case Else
            'do nothing
    End Select

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,656
Messages
6,120,762
Members
448,991
Latest member
Hanakoro

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