Macro Doesn't Run With Command Button, But Does Run With F8 Key

R

ryguy7272

A problem occurred in Excel, late in the day yesterday. A macro that worked
for a long time stopped working all of a sudden. I subsequently ran a few
other macros and these others failed too. As far as I can tell, nothing has
changed to cause this behavior. When I step through the code with F8, the
macro runs fine. It was late, so I thought I could just down the machine,
come in today, reboot, and everything would be reset to normal. No such
luck. What would prevent a macro (or several macros) from running, via a
Command Button, but cause it to run by means of pressing the F8 key
repeatedly?

Thanks for the help!
Ryan--
 
J

JLGWhiz

If you are getting any messages along with the failures, it would help to let
us know what the message says. Since we cannot see your system or what you
are specifically doing, you have to be our eyes and convey via the posting
any messages that appear on screen when you attempt to run a macro that
"fails".
 
G

Gary''s Student

The button assignment may be broken. For example, if it is a Forms button,
right-click the button and select:

Assign Macro...

check to see if all is o.k.


If it is a Controls button, then right-click the button and View Code.
 
R

ryguy7272

Thanks for looking guys! Actually, the problems were numerous... Too
difficult to describe. One macro could not select a range, one macro could
not display a UserForm, one macro could not do a simple calculation...the
bizarre behavior worsened throughout the day. Must have gotten corrupted
somehow. We just went to Control Panel, uninstalled Excel and reinstalled it
from the CD. Problem resolved.

Thanks!
Ryan--
 

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