Interrupt running macro?

In the VB Editor, when I'm testing a macro, I can press the BREAK key to 
interrupt and stop the macro. Is there a way to interrupt a macro while it's 
running from an add-in? (I tried pressing the BREAK key, but that didn't 
work. Incidentally, I tried Ctrl+C, from DOS days, but that didn't work 
either.)

I found this example: http://www.pptfaq.com/FAQ00972.htm, but I'm not sure 
how to get my event handler to send a message back to the active/running 
macro and tell it to Exit Sub.

If there is another better or easier way to accomplish this, I'm open to any 
suggestions.
0
Utf
11/19/2009 3:29:03 PM
powerpoint 2011 articles. 0 followers. Follow

2 Replies
1243 Views

Similar Articles

[PageSpeed] 9

In article <FB2FC739-4FA8-4AE5-8E2E-8D5495C9F503@microsoft.com>, Caten wrote:
> In the VB Editor, when I'm testing a macro, I can press the BREAK key to 
> interrupt and stop the macro. Is there a way to interrupt a macro while it's 
> running from an add-in? (I tried pressing the BREAK key, but that didn't 
> work. Incidentally, I tried Ctrl+C, from DOS days, but that didn't work 
> either.)
> 
> I found this example: http://www.pptfaq.com/FAQ00972.htm, but I'm not sure 
> how to get my event handler to send a message back to the active/running 
> macro and tell it to Exit Sub.

You can't send a message to a running sub but your event handler could toggle a 
global flag variable that the running sub checks periodically.



==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Steve
11/19/2009 6:56:51 PM
The "Stop" statement causes a break in the macro execution. It works as if 
you had placed a breakpoint at that line. Once interrupted at the "Stop" 
statement, you can press F5 to resume from that line onwards.

- Chirag

  PowerShow - View multiple PowerPoint slide shows simultaneously
  http://officeone.mvps.org/powershow/powershow.html

"caten" <caten@discussions.microsoft.com> wrote in message 
news:FB2FC739-4FA8-4AE5-8E2E-8D5495C9F503@microsoft.com...
> In the VB Editor, when I'm testing a macro, I can press the BREAK key to
> interrupt and stop the macro. Is there a way to interrupt a macro while 
> it's
> running from an add-in? (I tried pressing the BREAK key, but that didn't
> work. Incidentally, I tried Ctrl+C, from DOS days, but that didn't work
> either.)
>
> I found this example: http://www.pptfaq.com/FAQ00972.htm, but I'm not sure
> how to get my event handler to send a message back to the active/running
> macro and tell it to Exit Sub.
>
> If there is another better or easier way to accomplish this, I'm open to 
> any
> suggestions. 

0
Chirag
11/19/2009 7:00:01 PM
Reply:

Similar Artilces:

Open workbook without running Workbook_Open Event
I'm using Excel 2007. How do I open a workbook (the workbook is a .xls 97-2003 format) WITHOUT running the Workbook_Open event? I tried holding down the SHIFT key while opening as this worked in previous versions of Excel, but the event still runs (unfortunately, there is an ActiveWorkbook.Close at the end of my code so I can't get in to modify it :( I'm sure there is a simple way to do this in 2007 but I do not know it. Thanks for the help. Hi Domenick I read more about this problem Works OK for me when I use Office Button>Open and hold the Shift key Chang...

Running memorized reports without intervention
Is there a way to run a memorized report without having to hit the OK button on the report filter page every time I want to run the same Daily Sales Report? I assume you could modify the QRP file in some way to automate this. Thanks, Wayne I hate to add to your question but...How do you get the date to automatically change to the current date? When I save a memorized report with the date range set at "Today" it stores that date, and the next day I run it I have to adjust the date again because now it is yesterdays date. Seem quite useless to me. You seem to only have to hi...

Interrupts?
Not seen much about interrupts, and not even entirely sue what they are. But I've noticed - coincidentally or not - that since I did the delete of MS Update software to get back to using the less processor hogging Windows Update, I keep seeing interrupts flare up to a large percentage of the cpu. This is on an old Inspiron 2600 laptop with only 260 meg of memory at the moment. It was recently updated to an 80gig WD hard drive, which seems to be running well, and this is with XPHome SP3 all up to date. There seems to be no way of seeing what these interrupts are for, as they...

sorry to interrupt...
Sorry to interrupt, but I just checked my account balance for a site that i joined a little while ago... and i made like $27 not doing a damn thing! I signed up, referred a few people, read a few emails and forgot about the site until today! Seriously, take a minute and just check it out! http://www.inboxdollars.com/?r=voodoochild ...

There was an error running rules. Not all messages were processed
I am running Outlook 2007 on Windows 7 64 Bit. I am having a problem with the rules. Every time I run the runs (either a new one just created or an existing one) I get the Message 'There was an error running rules. Not all messages were processed'. I have deleted and recreated all my rules but still get the error, any ideas?. Try starting Outlook with the /cleanrules switch. This will clean all the rules from the server and client, including possible hidden ones. Start-> type; outlook.exe /cleanrules (note the space in the command) -- Robert Sparnaaij [MVP-...

inserting line that runs between columns in a table
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Hi, <br> I want to insert a line (really an arrow) within one row that extends between more than one column in a table. <br><br>Along the top of the table I have months and I want to show than an activity begins in one month and extends for several months -- an arrow would be just the thing. <br><br>When I try to extend the line beyond the cell, it simply won't go any further. <br><br>Thanks, <br> Karen There is no specific provision for that in Word. Your...

Run ALL rules at once w/o checking 1 by 1?
OLE6 Is there a way to manually run all rules at once without checking each one, one by one? Thanks, Ken Try posting this in an Outlook Express news group - this is not one of them. Outlook is a part of Microsoft Office and is what this group supports. Outlook Express is a part of Internet Explorer and has its own news groups. You can also find some good Outlook Express information here: http://insideoe.tomsterdam.com --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my pe...

macro help please #3
http://s41.yousendit.com/d.aspx?id=3VBCNO99P2VB622EGB6KMP779I This links to my 64kb worksheet, please download if you can help, post back the upgrade link? I'm having trouble with creating correct macro. Sheet 2 is "testing" page, Sheet 1 is the current working worksheet. Got so far, via "record macro" but then couldn't add in a subroutine for "user select" - got error that I can't resolve. I want a macro (with a button) to do the following - Select the datablock B1 : I90 (name, numbers and "paid" columns) USER select a name for deleti...

How to set time within macro?
Does anyone have any suggestions on how to set time for processing the code? I would like to add a condition that allow process the code before 4 pm, Does anyone have any suggestions on how to do it? Thanks in advance for any suggestions Eric If FileDateTime(PathFileName) > Date + TimeSerial(8, 0, 0) Then {It is working!} I would like to add another condition that allow process the code before 4 pm, which I tried and show below, but it does not work. If FileDateTime(PathFileName) > Date + TimeSerial(8, 0, 0) Or Now < TimeSerial(16, 0, 0) Then {It does not wor...

running a subroutine from the parent form
Hi I have a Main form called OpenLesson with a subform called SuggestedLesson displayed as a datasheet I have a button on the OpenLesson form called cmdRunSuggestedthat takes information from the current record in the subform and starts a lesson. I would like to call the code behind the button cmdRunSuggested_Click by double clicking a control in a record in the subform. Forms!parent!cmdRunSuggested_Click Forms!OpenLesson!cmdRunSuggested_Click didn't work form me. What syntax do I need for this Thanks Thanks Dorian That makes sense. I will go that way ...

an isolated user has issue running a rules wizard
I get an error message stating; "One or more rules could not be uploaded to Exchange server and been deactivated. This could be because some of the parameters are not supported or there is insufficent space to store all of your rules." Space is not the case, when trying to run any rule, I get this error, also I get this message for this user only no matter which PC in the Domain we log into same message appears. Currently the Outlook client shows 0 rules, when I try to add a rule the message appears. Weird thing did happen though, when I found the rule I created sometime ago ...

outlook 2007 runs slow
Hi Outlook 2007 runs slow. Is there a way to speed it up. Thanks Do you have the outlook performance update installed? Are you using a Dell laptop? Did you upgrade from an older version and are still using that profile? http://www.slipstick.com/outlook/ol2007/slow.htm - install the update listed at the end - also make sure all OS and Office updates available through Microsoft update are installed. If it's still slow, try the various solutions that apply to your situation. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Ta...

macro
Hi, Need help on macro, pls. see if what I'm thinking is possible: I have 2 sheets in my file, the first sheet is where I input my data and I formatted sheet 2 for printing purposes. Let say I have these in sheet 1: Data 1 Date 2 Data 3 aaaa aaaaaa aaaaaaaaaaaaaa bbbb bbbbbb bbbbbbbbbbbbbb cccc cccccc cccccccccccccc Let say my cursor is on the first row of my data. I created a macro, with a corresponding shortcut key, so that the data on that row will be transferred to sheet 2 like: Data 1 aaa Date 2 aaaaaa Date 3 aaaaaaaaaaaaaa Now, I want to change the code (or mayb...

Is there a macro to create charts automatically?
Hi, I have a sheet of data that relates to individual performance scores. Each person has their data on one row which goes - Name, Team, Score 1, Target, Score 2, Target, Score 3, Target, Score 4, Target. I need to produce an individual graph for each person containing only the 4 score results. As there are over 120 individuals, is there a way, without manually creating each one of using a macro or something to make chart creation easier? Select your range (including header row) and run this macro: Sub MakeMyCharts() ' Dim ws As Worksheet Dim rng As Range Dim Yaddr As Stri...

How to Run Macro in open workbook/s
I want to create procedure that running in open workbook or selecting sheet ? please show me how ? -- hni ------------------------------------------------------------------------ hni's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28451 View this thread: http://www.excelforum.com/showthread.php?threadid=480530 Private Sub Worksheet_Activate() 'your code End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet ...

Do I need to run eseutil?
Was reviewing 1221 events in application log and spotted a jump in available space from 500MB to about 3000MB in one night. Recently ran eseutil against the database. Does this jump in free space mean I may need to run it again? No, it just means you wasted your time the last time you ran it. I see no reason to run an offline defrag unless you are out of disk space and have no other options, are running against the 16GB standard limit or have moved a "substantial" number of mailboxes and created a large amount of white space in the database. On Mon, 18 Oct 2004 15:55:08 -0700, ...

Can't run RUNAS anymore
For some reason, I can't use Runas. It says it can't find path etc. and don't have file permission. Thanks. I would check for malware for sure. I would also check disk integrity with the chkdsk utility or something similar. "Mint" <chocolatemint77581@yahoo.com> wrote in message news:f5be5dd5-4503-47e2-80a7-aa641367ee42@q27g2000yqn.googlegroups.com... > For some reason, I can't use Runas. It says it can't find path etc. > and don't have file permission. > > Thanks. See if line 111 helps: http://www.kellys-korner-xp...

VBA Excel Macro worked for 2-years now dosen't??
Is there a limit on how much code you can place in a VBA file?=A0 All works well except the macro I call "VacUsed"=A0 It is called from a couple of procedures I post the last procedure=A0"ThisWorkBook" use to close and save the workbook.=A0 Private Sub Workbook_BeforeClose(Cancel As Boolean)=A0 =A0 =A0 Call FilterTestOff=A0 =A0 =A0 Call VacUsed=A0 =A0 =A0 Call DeleteMenu=A0 =A0 =A0 Call AllProtect=A0 =A0 =A0 Sheets("VacationAccrued").Activate=A0 End Sub=A0 Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As=A0Boolean)=A0 =A0 =A0 C...

Cannot run in release mode using "start without debugging"
Please help, thanks very much. I wrote a win32 windows project. The problem is in one of a class's constructor, if I use "new" to allocate memory and if I run my program in "release" using "start without debugging", it will crash with error "Unhandled exception at 0x7c93426d in MasterV2.exe: 0xC0000005: Access violation reading location 0x00000000.". However, it work nice in "debug" using "start" or "start without debugging", also fine in "release" using "start". And if I change GLuint edgeDI...

Outlook always running
How do I make Outlook always run without it being minimized? I dont have enough screen space to keep it minimized, but it takes too long for it to load up every time I want to check my email. Thanks ...

Run code every 15 minutes
Hello Is there a way to run a set of codes every 15 mins. eg. Private Sub FormButton_Click() Do something here wait 15 mins and then repeat the Do something here end sub Thank you At the opening of your database, open a form in hidden mode and use the timer event with a 15 mintue loop. But I have to ask, what need to be run every 15 minutes? -- Hope this helps, Daniel Pineault http://www.cardaconsultants.com/ For Access Tips and Examples: http://www.devhut.net Please rate this post using the vote buttons if it was helpful. "Karren Lorr" wr...

macro settings
how do I change the security settings for macros After managing to set up OE-QuoteFix on his new PC, Ed reads a message from domestic911 <anonymous@discussions.microsoft.com>... > how do I change the security settings for macros? Tools > Macro > Security? -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm ...

journal printing interrupted
Hello, I have an issue where a SOP batch always results in the: " batch was interrrupted while receiving data from another module and is available in the Batch Recovery Window." error. It is available batch recovery with a status of "Journal Printing Interrupted". Upon further checking I found I am unable to print anything so it seems to be a print driver/setup issue. The system is remote so I don't have access to the printer. Is this possibly a service pack issue? ...any ideas? thx, Doug -- Doug Wilson Great Plains Consultant MCS Canada ...

Parsing Macro?
My data appears in column B in the following format. It relates to horseracing sires with the heading SIRE. Could I create a macro that would parse the data as in the second example? Ideally, as in the third example. This would enable me to do an alphabetical sort of names. The lower case letters preceding the sire's name can vary according to sex and colour. I suppose the only consistent indicator would be the capital letter? SIRE b g Medicean (GB) - Limuru (GB) b f Alhaarth (IRE) - Aljeeza (GB) b f Tobougg (IRE) - River Art (USA) b g Kalanisi (IRE) - Phi Beta Kappa (USA) b g K...

To change the application to start if i run a hyperlink
I have on a notebook a cell with a hyperklink to a image of .jpg type. When i click on hyperlink, excel (2003) run Internet Explorer 7 application, bat i want to open and to run Picture Manager application. On my desktop, for the sames conditions, run Picture Manager: Can i change on the notebook the application to open my .jpg file (Picture Manager instead I.E. 7)? Thanks for your help P.S. Scuse me for my incorrect exposure Giuseppe, Try this (For Windows XP): Open your "My computer" choose Tools / Folder Options... "File Types" tab, then select JPG files and in t...