How do I change activex control properties from a macro
Quick sample: (Paste into This Workbook module) of your file:
and change accordingly (cells and values)
Private Sub Workbook_Open()
With Worksheets("Sheet1")
.CommandButton1.Enabled = True
If .Range("B4").Value = 6 Then
.CommandButton1.Enabled = False
End If
End With
End Sub
"Billums" wrote:
I want to change the properties of a button on a worksheet when the workbook
is opened so that if a cell contains a certain value the button is inactive
if the cell doesn't contain that value the button is active. I am using
Office XP.
|