PC Review


Reply
Thread Tools Rate Thread

Button on Userform to Stop a Macro

 
 
Steph
Guest
Posts: n/a
 
      4th Oct 2008
I've created a simple add-in with code that loops through a large range of
data. I would like to add a button to the userform that allows the operator
to stop the macro at any time. Is there code or a command that I could
include in a button-click event that would allow the user to stop the macro?

--
Steph
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      4th Oct 2008
Why not just teach them to use Ctl + Break? Or build in a break point in
your code that they can then restart. VBA does not lend itself to easily
stopping and restarting at a user's convenience.

"Steph" wrote:

> I've created a simple add-in with code that loops through a large range of
> data. I would like to add a button to the userform that allows the operator
> to stop the macro at any time. Is there code or a command that I could
> include in a button-click event that would allow the user to stop the macro?
>
> --
> Steph

 
Reply With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      4th Oct 2008
You may be able to find something here.

http://en.allexperts.com/q/Visual-Ba...s-Function.htm
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Steph" wrote:

> I've created a simple add-in with code that loops through a large range of
> data. I would like to add a button to the userform that allows the operator
> to stop the macro at any time. Is there code or a command that I could
> include in a button-click event that would allow the user to stop the macro?
>
> --
> Steph

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop running macro button, like Ctrl-Break button h2fcell Microsoft Excel Programming 8 23rd Jan 2009 04:01 PM
Re: Stop running macro button, like Ctrl-Break button Dave Peterson Microsoft Excel Programming 1 22nd Jan 2009 05:23 PM
Stop macro with userform =?Utf-8?B?SmVmZg==?= Microsoft Excel Misc 1 30th Jul 2007 02:38 PM
how to run macro in userform button =?Utf-8?B?a2h1cnJhbSBzYWRkaXF1ZQ==?= Microsoft Excel Misc 2 4th Mar 2005 12:47 PM
userform macro button problemo Aashi Microsoft Excel Programming 2 25th Apr 2004 11:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:47 PM.