Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box names.?

Status
Not open for further replies.

WJT19

Computer
Jun 20, 2003
4
Im trying to use an if statment where the "IF" part refers to the choice taken in a combo box. Iv got it working oerfectly using cell, but I just cant get it to use the combo box instead of the cell.

Basicall all i need to know is what is combo box 1 called, Iv tried combo box 1, combobox1, combobox.1 and a few others, but non seem to work for me.

Please help
Thanx
Will [yinyang]
 
Replies continue below

Recommended for you

There is no direct way to reference a combobox (or any control for that matter) from a worksheet formula. In order to get the combobox value selected, first set the LinkedCell property of the combobox to a cell on the worksheet (say $A$1) then use $A$1 in all formulae that require the combobox selection.

You can directly reference a control from a VBA subroutine by using its codename or shapes collection name.
 
From your question it is not clear if your "if" statement is in the spreadsheet or in VB.

cummings54's reply seems reasonable if the if is in the spreadsheet.

If in the VB code the value of combobox1 is "combobox1.value"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor