Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default Macro Fails to Run Correctly

I have about seven procedures that are written to run in succession from a
worksheet CmdBtn. However, several do not unless I manually run them with
F5. It has worked for me in other applications, so I'm baffled. Plus, the MS
debugger identifies the problem with a Range.ClearContents function which is
the last procedure and yet several procedures before it have failed, so I'm
doubly baffled. And, as stated, they all run without a hitch when run
manually.

Any suggestions? Thank you.

Jim Kobzeff


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro Fails to Run Correctly

The code you say doesn't run; is it conditional on if statements. If so,
possibly your conditions are not being met.

--
Regards,
Tom Ogilvy

"JK" wrote in message
...
I have about seven procedures that are written to run in succession from a
worksheet CmdBtn. However, several do not unless I manually run them with
F5. It has worked for me in other applications, so I'm baffled. Plus, the

MS
debugger identifies the problem with a Range.ClearContents function which

is
the last procedure and yet several procedures before it have failed, so

I'm
doubly baffled. And, as stated, they all run without a hitch when run
manually.

Any suggestions? Thank you.

Jim Kobzeff




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Macro Fails to Run Correctly

In addition to Tom's suggestion, do you have any 'On Error Resume
Next' or 'On Error goto {somewhere}' statements? If so, unless they
are protect against *expected* errors, lose them. You will find
debugging greatly simplified.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I have about seven procedures that are written to run in succession from a
worksheet CmdBtn. However, several do not unless I manually run them with
F5. It has worked for me in other applications, so I'm baffled. Plus, the MS
debugger identifies the problem with a Range.ClearContents function which is
the last procedure and yet several procedures before it have failed, so I'm
doubly baffled. And, as stated, they all run without a hitch when run
manually.

Any suggestions? Thank you.

Jim Kobzeff



  #4   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default Macro Fails to Run Correctly

Thank you for the suggestions. Both did contribute in finding the problem.
Seems the sheet must be activated. Strange because it worked fine without
activation up until a week ago.

Thanks again

"JK" wrote in message
...
I have about seven procedures that are written to run in succession from a
worksheet CmdBtn. However, several do not unless I manually run them with
F5. It has worked for me in other applications, so I'm baffled. Plus, the

MS
debugger identifies the problem with a Range.ClearContents function which

is
the last procedure and yet several procedures before it have failed, so

I'm
doubly baffled. And, as stated, they all run without a hitch when run
manually.

Any suggestions? Thank you.

Jim Kobzeff




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 fails to calculate cells correctly Toi Excel Discussion (Misc queries) 2 May 7th 07 06:47 AM
Macro fails when worksheet protected George Tattam Excel Discussion (Misc queries) 5 February 9th 06 11:07 PM
Macro Suddenly Fails Bill Martin Excel Discussion (Misc queries) 2 September 16th 05 01:55 PM
1-variable Data Table dependent on MS Query fails to update correctly [email protected] Excel Discussion (Misc queries) 0 March 30th 05 07:43 PM
Macro fails without VB help files Michael Miazga[_2_] Excel Programming 0 July 22nd 03 04:10 PM


All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"