Posts by efr

    Re: Set Focus on Combobox


    Quote from Phil Policelli;253917

    I have an application in excel in which a “combobox1” has been created on the main sheet of excel. Somewhere during the code execution the program requires input from the “combobox1”. What is the code required to highlight the “combobox1” allow the user to select from the box and then return control back to the regular code?


    To setfocus on a ComboBox in a sheet you need activesheet.combobox1.activate or sheets("your sheet name").combobox.activate


    to continue the rest of the code there are several ways, it would be good to have a sample of the code or more info. It seams that you have a variant that will need the ComboBox value to continue. If that is so you should have it either using something like my.variant = combobox1.value or by splinting the code.