Control button question

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
 
B

Bill Lunney

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
 

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