View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Form Controls on a worksheet and Macro

Maybe the index isn't what you think it is. Can you use its name?

ActiveSheet.CheckBoxes("check box 1").Enabled = False



Peter M wrote:

Bob,

I have now been able to identify the checkboxes as you describe, but the
following line of code achieves nothing, where m is set to the relevant
checkbox index number:

activesheet.checkboxes(m).enabled = false

I have also tried setting the .visible property to false, but that seems to
have no effect either?

What am I doing wrong?

Peter

"Bob Phillips" wrote in message
...
Peter,

For Each chk In Activesheet.Checkboxes
Debug.Print chk.Name, chk.Value
Next chk

--

HTH

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

"Peter M" wrote in message
...
I have a number of checkboxes on a worksheet that I wish to disable or
enable under macro control, but I dont seem to be able to identify them

in
the excel object model.

Any hints or directions gratefully received.

Peter





--

Dave Peterson