disabling combobox with VBA

  • Thread starter Thread starter Thrava
  • Start date Start date
T

Thrava

Hi folks,

I want to disable combobox12 after a selection of "-" is
made from the dropdown menu of combobox2.

But it doesn't seem to work.
Any help is appreciated.

Private Sub combobox2_click()
ActiveSheet.PivotTables("PivotTable2").RefreshTable
If (Cells(3, "BC").Value = "-") Then
ComboBox12.Enabled = False
End If
End Sub
 
Thrava,

How about

Private Sub combobox2_click()
ActiveSheet.PivotTables("PivotTable2").RefreshTable
If combobox2.Value = "-" Then
ComboBox12.Enabled = False
End If
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
thanks pal,
yeap, thats it.
ciao
Thrava
-----Original Message-----
Thrava,

How about

Private Sub combobox2_click()
ActiveSheet.PivotTables ("PivotTable2").RefreshTable
If combobox2.Value = "-" Then
ComboBox12.Enabled = False
End If
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)




.
 
Back
Top