I hate Buttons...

kpm30519

New Member
Joined
Nov 9, 2018
Messages
22
I have a workbook that is stored on a server (a NAS, really.)
One sheet has a few command buttons and checkboxes that help me transfer data to other sheets.
All of this works just fine.
However, every single time I check a box or click a button, the format changes-- The checkbox gets smaller, or the font of the text label on the button gets smaller. Sometimes the buttons move. The actual Properties of the box or button don't change, just (apparently) the appearance.
I use Excel 2019, but I think this workbook was created in Excel 2010.

I've been all over Google, but can't find a good, quick solution and I'd rather not rewrite all the code.

Any thoughts or ideas welcome.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You could try transferring everything to a new workbook.
 
Upvote 0
You could just pick cells to use as buttons and assign a worksheet_selectionchange script to run your specfic macros.

For example:

Book1
ABCDE
1Button 1Button 2Button 3
2
3
Sheet1


VBA Code:
Private Sub worksheet_selectionchange(ByVal target As Range)

If Not Intersect(target, Range("B1")) Is Nothing Then
    'do something
    MsgBox "button 1 pressed"
End If

If Not Intersect(target, Range("C1")) Is Nothing Then
    'do something
    MsgBox "button 2 pressed"
End If

If Not Intersect(target, Range("D1")) Is Nothing Then
    'do something
    MsgBox "button 3 pressed"
End If
End Sub
 
Upvote 0
You could just pick cells to use as buttons and assign a worksheet_selectionchange script to run your specfic macros.

For example:

Book1
ABCDE
1Button 1Button 2Button 3
2
3
Sheet1


VBA Code:
Private Sub worksheet_selectionchange(ByVal target As Range)

If Not Intersect(target, Range("B1")) Is Nothing Then
    'do something
    MsgBox "button 1 pressed"
End If

If Not Intersect(target, Range("C1")) Is Nothing Then
    'do something
    MsgBox "button 2 pressed"
End If

If Not Intersect(target, Range("D1")) Is Nothing Then
    'do something
    MsgBox "button 3 pressed"
End If
End Sub
This is a cool approach, one I'd've never thought of, but it's still not getting to a real solution. Thanks, though
 
Upvote 0
Alternatively…whatever macros you have assigned to your buttons, add a line to set the font size so they every time you press the button it will reset the font size for you.
 
Upvote 0
Ultimately this is an ongoing bug in the activeX controls. I would t expect it to be fixed any time soon so we need to resort the these types of workarounds.
 
Upvote 0

Forum statistics

Threads
1,215,745
Messages
6,126,634
Members
449,324
Latest member
AmirMalik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top