Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Button on Userform to Stop a Macro

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Button on Userform to Stop a Macro

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Button on Userform to Stop a Macro

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
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
How to stop macro with cancel button Alex St-Pierre Excel Programming 8 March 13th 08 01:53 PM
Stop macro with userform Jeff Excel Discussion (Misc queries) 1 July 30th 07 02:38 PM
Start/Stop Macro Button Paul987 Excel Discussion (Misc queries) 1 July 10th 06 05:14 PM
Stop Macro button in Excel VB grahammal[_2_] Excel Programming 4 November 11th 05 02:35 PM
Macro Record Stop Button Patrick Simonds Excel Discussion (Misc queries) 2 July 31st 05 06:11 PM


All times are GMT +1. The time now is 05:06 AM.

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

About Us

"It's about Microsoft Excel"