Disable Check box on Mac Works on a PC

K

krbaugh1

When I do this on a pc it works
ActiveSheet.Shapes("F221FCHECK").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 22
Selection.ShapeRange.Fill.Transparency = 1
Selection.ShapeRange.Line.Weight = 0.85
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
[f221fcheck].Enabled = True

But on a mac It wil change the background of the check box F221FCHECK
but it will not disable it. It is a form check box so id does work on
the mac but I can not disable it.

Any ideas
 
J

JE McGimpsey

[f221fcheck].Enabled = True

But on a mac It wil change the background of the check box F221FCHECK
but it will not disable it. It is a form check box so id does work on
the mac but I can not disable it.

To *disable* you need to use

[f221fcheck].Enabled = False



OTOH, you don't need to select or evaluate at all:

With ActiveSheet.CheckBoxes("F221FCHECK")
With .ShapeRange
With .Fill
.Visible = msoTrue
.Solid
.ForeColor.SchemeColor = 22
.Transparency = 1
End With
With .Line
.Weight = 0.85
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoFalse
End With
End With
.Enabled = False
End With
 
K

Kevin R Baugh

Sorry I posted the wrong code.
I posted the code I use to enable.
This is what I use to changeand disable.

ActiveSheet.Shapes("F221FCHECK­").Select
Selection.ShapeRange.Fill.Visi­ble = msoTrue
Selection.ShapeRange.Fill.Soli­d
Selection.ShapeRange.Fill.Fore­Color.SchemeColor = 22
Selection.ShapeRange.Fill.Tran­sparency = 1
Selection.ShapeRange.Line.Weig­ht = 0.85
Selection.ShapeRange.Line.Dash­Style = msoLineSolid
Selection.ShapeRange.Line.Styl­e = msoLineSingle
Selection.ShapeRange.Line.Tran­sparency = 0#
Selection.ShapeRange.Line.Visi­ble = msoFalse
[f221fcheck].Enabled = False

Thanks for the tip on the with statments I can try it and see if
the mac likes your with statment better than mine.
 
J

JE McGimpsey

Kevin R Baugh said:
This is what I use to changeand disable.

That code disables the checkbox for me.

OTOH, I'm getting lots of weird visual effects that I've reported to
MacBU. But the checkbox is definitely disabled.

I'm using XL2004 on Mac OS X 10.3.9.
 
K

Kevin R Baugh

Thanks

I have several users only one has a Mac Everyone else is not having a
problen
I will try the code you sent and see what happens

Thanks for the help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top