Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to select combobox
    primarykey
    data
    text
    <p>I have a combo box named "Facility" that has been added as a form control to an Excel 2010 worksheet. I also have a module titled "AdjustmentsAmount" that is running the below method on a form button click. I've tried several methods of accessing the form control, and none work, also listed below. Can anyone shed light on this subject please?</p> <p>Code</p> <pre><code>'Clears all run specifications Sub clearRunSpecs_click() Dim resp As String resp = MsgBox("This will clear all run specifications. Are you sure you want to continue?", vbYesNo) If (resp = vbYes) Then Worksheets("AdjustmentsAmount").Unprotect "pass" Range("D3").Clear Range("D3").Interior.Color = RGB(235, 241, 222) Range("D3").BorderAround LineStyle:=XlLineStyle.xlContinuous, Weight:=xlMedium, ColorIndex:=xlColorIndexAutomatic, Color:=RGB(0, 0, 0) Range("D3").Locked = False Range("D4").Clear Range("D4").Interior.Color = RGB(235, 241, 222) Range("D4").BorderAround LineStyle:=XlLineStyle.xlContinuous, Weight:=xlMedium, ColorIndex:=xlColorIndexAutomatic, Color:=RGB(0, 0, 0) Range("D4").Locked = False Range("B4").Clear Range("B4").Interior.Color = RGB(235, 241, 222) Range("B4").BorderAround LineStyle:=XlLineStyle.xlContinuous, Weight:=xlMedium, ColorIndex:=xlColorIndexAutomatic, Color:=RGB(0, 0, 0) Range("B4").Locked = False Range("A17:D22").Clear Range("A17:D22").Merge Range("A17:D22").Interior.Color = RGB(235, 241, 222) Range("A17:D22").BorderAround LineStyle:=XlLineStyle.xlContinuous, Weight:=xlMedium, ColorIndex:=xlColorIndexAutomatic, Color:=RGB(0, 0, 0) Range("A17:D22").VerticalAlignment = xlTop Range("A17:D22").Locked = False ActiveSheet.Shapes("Facility").ListIndex = -1 ActiveSheet.CheckBoxes("ZeroBalance").Value = xlOff ActiveSheet.CheckBoxes("Balance&lt;Adj").Value = xlOff ActiveSheet.CheckBoxes("Balance=Adj").Value = xlOff Worksheets("AdjustmentsAmount").Protect "pass" End If End Sub </code></pre> <p>Methods tried</p> <pre><code>ActiveSheet.Shapes("Facility") ActiveSheet.Facility ActiveSheet.ListBoxes("Facility") Application.Facility </code></pre> <p>I have accessed checkboxes in the same method using <code>ActiveSheet.CheckBoxes("NAME")</code> and that worked fine. However, I can't seem to get ahold of the combo box.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload