Removing border around Check box

F

Flash in the Pan

I have this code to create a label on a workshhet and then a check box
on top of the label

the code is:

Sub test()

'create label
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Label.1",
Link:=False, _
DisplayAsIcon:=False, Left:=0, Top:=0, Width:=240, Height:= _
75).Select
ActiveSheet.OLEObjects(1).Object.BackColor = &HC0C0C0

'create text box
ActiveSheet.OLEObjects.Add(ClassType:="Forms.CheckBox.1",
Link:=False, _
DisplayAsIcon:=False, Left:=16, Top:=16, Width:=65, Height _
:=18).Select
ActiveSheet.OLEObjects(2).Object.BackColor = &HC0C0C0


End Sub

the problem is that I cannot remove the border surrounding the text
box and its caption. The border is actually surrounding only on the
right and bottom of the check box. I tried changing the SpecialEffect
property of the check box from sunken to flat, but that only changes
the box around the checkbox itself and not the border surrounding the
check box and its caption.

the funny thing is that is I create this same check box manually and
not programmatically, including changing the color, and this border
does not show up.

Any ideas?

Thanks
 

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