View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Orion Cochrane Orion Cochrane is offline
external usenet poster
 
Posts: 119
Default disable macros in a worksheet

I was able to do the following with CommandButton1 using Control Toolbox and
Sheet1 Object:
Private Sub CommandButton1_Click()
Range("A2").Value = "Cochrane"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = "Orion" Then
CommandButton1.Enabled = True
Else: CommandButton1.Enabled = False
End If
End Sub

I tested it and it works. Substitute with your CommandButton1_Click actions.
--
I am running on Excel 2003, unless otherwise stated. Please rate posts so we
know when we have answered your questions. Thanks.


"Gordon" wrote:

Hi...

I have a workbook with 10 sheets with 15 buttons (with macros) per sheet. Is
it possible to enable/disable these buttons based on a a value entered in a
cell?

e.g. If the user enters a value into cell A1 he can begin to navigate the
workbook using the buttons/macros?

Someone must be clever out there.

Thanks

G