ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Doesn't Run With Command Button, But Does Run With F8 Key (https://www.excelbanter.com/excel-programming/405446-macro-doesnt-run-command-button-but-does-run-f8-key.html)

ryguy7272

Macro Doesn't Run With Command Button, But Does Run With F8 Key
 
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--



--
RyGuy

JLGWhiz

Macro Doesn't Run With Command Button, But Does Run With F8 Key
 
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".

"ryguy7272" wrote:

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--



--
RyGuy


Gary''s Student

Macro Doesn't Run With Command Button, But Does Run With F8 Key
 
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.

--
Gary''s Student - gsnu200767


"ryguy7272" wrote:

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--



--
RyGuy


ryguy7272

Macro Doesn't Run With Command Button, But Does Run With F8 Ke
 
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--

--
RyGuy


"Gary''s Student" wrote:

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.

--
Gary''s Student - gsnu200767


"ryguy7272" wrote:

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--



--
RyGuy



All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com