LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default abort macro dialog box

Thanks for your verry quick respond.
I found somthing in the helpfile and made som buttons to it.
So this is the code i intergrated in it:

On Error GoTo handleCancel
Application.EnableCancelKey = xlErrorHandler

For X = 1 To 1000000 ' Do something 1,000,000 times (long!)
' do something here
Next X

handleCancel:
If Err = 18 Then
If MsgBox("Do you want to quit?", vbYesNo) = vbYes Then
Exit Sub
Else
Resume
End If
End If


But thing i dont like when i say "NO" He start running the macro from
the beginning, and not from the point i interupt him.
Can this be doen or is that just impossible?
 
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
abort macro dialog box Chris Excel Programming 1 April 29th 05 01:28 PM
control of dialog macro dialog box. on open Gerry Abbott Excel Programming 0 July 22nd 04 05:41 PM
How to abort executing macro? perfb Excel Programming 1 June 16th 04 07:15 PM
Abort or continue Jason Gatsby Excel Programming 0 August 5th 03 02:16 AM
Abort or continue Ed Ferrero[_4_] Excel Programming 0 August 5th 03 02:01 AM


All times are GMT +1. The time now is 10:19 PM.

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"