PC Review


Reply
Thread Tools Rate Thread

Can a macro pause between steps, or prior to ending sub?

 
 
New Member
Join Date: Nov 2006
Posts: 4
 
      15th Dec 2006
I have a macro, when triggered, it copies, then "pastes special" then copies that and "inserts cells below". The point of the double copy is to get the values, not the formula's when I insert below, its like a recorder.

The macro works fine but it is triggered when a condition is meet, such as cell a1 displaying a 6 rather than a 5. The cell may display the number 6 for 10 minutes prior to going back to number 5, resulting in my macro to run over and over again, maybe a 100 times within that 10 minutes, leaving me with loads extra records which i don't need.

I posted my macro below, Is there a way I can have my macro pause after completing its steps for like 1 minute. So basically continue to run for just 1 minute doing nothing, then end.

I know very little with MVB so if you could just help me with the modification to the code I would be very thankful.


AL

MY MACRO

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/15/2006 by Bob
'

'
Sheets("Sheet2").Select
Range("A5:L7").Select
Selection.Copy
Range("A9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A8:L11").Select
Application.CutCopyMode = False
Selection.Copy
Rows("17:17").Select
Selection.Insert Shift:=xlDown
Range("A1").Select


End Sub
 
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 / Pause a Macro using Pause button scott56hannah Microsoft Excel Programming 4 27th Jun 2008 12:48 PM
Pause an executing Word Macro to enter info and then Macro continu =?Utf-8?B?c3Ryb25nd2VsbA==?= Microsoft Word Document Management 1 11th Aug 2006 06:57 PM
Don't show the steps in a macro =?Utf-8?B?TFNrYXJiZWs=?= Microsoft Excel Programming 2 11th Apr 2006 11:52 PM
How would I set up prior month starting with ending mo in Access =?Utf-8?B?Y2psb25lcmFuZ2Vy?= Microsoft Access 0 23rd Sep 2005 05:37 AM
Steps from Macro recorder for Pivot table will not run as a Macro Nancy Microsoft Excel Programming 0 2nd Apr 2004 10:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:04 PM.