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!
 

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,977
Office Version
  1. 365
Platform
  1. Windows
Consider setting calculations to manual
That allows you to choose when formulas are recalculated

 

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
2,962
Office Version
  1. 365
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,127,594
Messages
5,625,688
Members
416,127
Latest member
MALEPINZON

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
Top