Control button question

  • Thread starter Thread starter Peter Bugnet
  • Start date Start date
P

Peter Bugnet

I have a number of buttons with VBA code linked to them
on a worksheet. All buttons do the same thing (format
some cells and copy some data from one sheet to another).
But two of the buttons, when another button is clicked
afterwards, change to a depressed picture. The code is
not triggered, just the graphical look of the button is
changed. Anyone have any ideas what causes this and how I
stop it?

Thanks
 
Assuming we're talking about ActiveX type command buttons check the
TakeFocusOnClick property. I would ensure this property is set to false
unless you have a reason otherwise as it cures some side issue bugs. This
alone won't account for the behaviour you're suggesting so I would try:

- In design mode double click the button, enter some code in the click event
(Msgbox "hello" will do) exit design mode and press the button

You should see your code execute now. The button must be enabled in your
case as the control is taking focus in the first place which is normal.



--
Regards,


Bill Lunney
www.billlunney.com
 
Back
Top