vendredi 5 décembre 2014

Excel/VBA: set focus on ComboBox (ActiveX Control) in Office 2007


Vote count:

0




I have an Excel file with a combobox (name = "Combobox1"). After running a script (basically pasting the selected value in "the next row" of a column) I want the focus to be reset on the combobox at the end of the script, so doing allowing me to type the next entry in the Combobox without having to click on the ComboBox text field first.


This does the job in Excel 2013 but I would like to have it working in 2007 as well:



Combobox1.Activate


Anyone any idea?


Or: I can replace the combobox with an in-cell dropdown list (data validation) and the same data validation as the one I have in the combobox at the moment, but then I have another issue: For a ComboBox you can choose to have the dropdown list active, but for an in-cell data validation that is not the case, at least not if you want to be able to type in the cell after the list is shown with ALT+UP or



Application.SendKeys "%{UP}"


Any idea here?


Thank you! MM7



asked 40 secs ago

MM7

1






Excel/VBA: set focus on ComboBox (ActiveX Control) in Office 2007

Aucun commentaire:

Enregistrer un commentaire