Set string variable to word displayed in a combobox

G

Graham Whitehead

I have a sheet which workouts the names of all other worksheets in another
workbook. A combobox is then populated with these names allowing the user
to select one of them. I need to set a string variable to the name the user
selects in the combobox so that the rest of my code with run from the data
on that sheet. How do I set a variable to hold the string value in the
combobox. Many thanks.
 
G

Guest

Hi Graham

Use like
youvar = Sheet1.Combobox1.Text

use the text property of combo


Thanks
Xcelion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top