Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizing the checkbox or option button

Status
Not open for further replies.

innov

Programmer
May 20, 2004
40
US
Hello everyone.

I've been using checkboxes, option buttons, etc. in EXCEL for some time but have never figured out how to re-size the button or box ITSELF. Some of my sheets have a small "zoom" percentage (i.e. 65%) and the buttons / boxes are much too small.

Is there a way to do it?

Thanks in advance!

innov
 
If using the controls from the Forms toolbox you can reset the height and width properties, but the text size will not change. Record a macro of setting up a box to see the code.

Using from the controls toolbox you can change practically anything. The problem then is that these controls, being more complicated, are very bug ridden and give rise to all kinds of problems including complete file corruption. It seems you might be using several, which would make matters worse - so I do not recommend it.

Perhaps resizing the buttons without text and using titles in cells might work ? I often need a check column in a long list of items, when checkboxes would be unsuitable anyway, so I use VBA code like this, which needs a doubleclick in the cell. Format the cell font as Windings - which can be sized/formatted as required :-

[tt]
'--------------------------------------------------------
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
Dim Tick As String
'- set to work in column 1 only
'- use Intersect for ranges
If Target.Column <> 1 Then Exit Sub
Tick = Chr(252) ' Wingdings tick
ActiveCell.Value = IIf(ActiveCell.Value = "", Tick, "")
End Sub
'-----------------------------------------------------
[/tt]



Regards
BrianB
Use CupOfCoffee to speed up all windows applications
================================
 
Brian,

Thanks for the feedback. Funny you should mention the alternative code. I'm actually doing just that (the wingding checkmark) or toggling the color of a cell, with a double-click.

So maybe here's the better question. To make a tighter application, I'm trying to implement the XP parameter of

Sheet.EnableSelection = xlUnlockedCells

It works like a charm (not allowing a user to select a locked cell. Problem is, my double-click toggles must be the active (selected) cell and I can't make them unprotected for sake of integrity (can I?)

Any thoughts on this new angle?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top