Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Temporarily pause macro so that changes can be made on a workbook

I have macro that opens up a file ("Book1") and pastes some info onto it from
another file. I have code (While loop) in the macro that checks whether
"Book1" is still open or not. What happens is that with the macro running in
background I am unable to do any action on Book1. I have tried putting in a
Wait timer but things remain the same. Is there a way to get around this. I
want the code to continue once I close Book1.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Temporarily pause macro so that changes can be made on a workbook

Try putting a STOP command in your code where you want the macro to pause.

HTH,
Matthew Pfluger

"Farooq Sheri" wrote:

I have macro that opens up a file ("Book1") and pastes some info onto it from
another file. I have code (While loop) in the macro that checks whether
"Book1" is still open or not. What happens is that with the macro running in
background I am unable to do any action on Book1. I have tried putting in a
Wait timer but things remain the same. Is there a way to get around this. I
want the code to continue once I close Book1.

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Temporarily pause macro so that changes can be made on a workbook

On May 16, 7:46 am, Farooq Sheri
wrote:
I have macro that opens up a file ("Book1") and pastes some info onto it from
another file. I have code (While loop) in the macro that checks whether
"Book1" is still open or not. What happens is that with the macro running in
background I am unable to do any action on Book1. I have tried putting in a
Wait timer but things remain the same. Is there a way to get around this. I
want the code to continue once I close Book1.

Thanks in advance


It sounds like you want to add a DoEvents in the macro loop. It
should allow manipulation of data in the target spreadsheet.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Temporarily pause macro so that changes can be made on a workb

thanks for the reply; I have tried putting "Stop" command and the macro does
stop but it won't start unless I do so manually. Is there a way to auto start
it once a certain condition is met such as when I close Book1.

"Matthew Pfluger" wrote:

Try putting a STOP command in your code where you want the macro to pause.

HTH,
Matthew Pfluger

"Farooq Sheri" wrote:

I have macro that opens up a file ("Book1") and pastes some info onto it from
another file. I have code (While loop) in the macro that checks whether
"Book1" is still open or not. What happens is that with the macro running in
background I am unable to do any action on Book1. I have tried putting in a
Wait timer but things remain the same. Is there a way to get around this. I
want the code to continue once I close Book1.

Thanks in advance

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Temporarily pause macro so that changes can be made on a workb

Can you please be specific; the macro should stop but should restart once
Book1 is closed.

Thanks

"T Lavedas" wrote:

On May 16, 7:46 am, Farooq Sheri
wrote:
I have macro that opens up a file ("Book1") and pastes some info onto it from
another file. I have code (While loop) in the macro that checks whether
"Book1" is still open or not. What happens is that with the macro running in
background I am unable to do any action on Book1. I have tried putting in a
Wait timer but things remain the same. Is there a way to get around this. I
want the code to continue once I close Book1.

Thanks in advance


It sounds like you want to add a DoEvents in the macro loop. It
should allow manipulation of data in the target spreadsheet.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

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
Help with Macro - Make Dropdown List Temporarily Wider AK9955 Excel Discussion (Misc queries) 2 April 27th 07 03:16 PM
Create new workbook, temporarily name it and copy sheets to it DerbyJim Excel Programming 4 January 12th 06 05:03 PM
Pause a macro? JohnnyJomp Excel Programming 4 March 10th 05 10:17 PM
Temporarily Disabling an Event Macro stratuser Excel Programming 2 December 2nd 03 08:07 PM
Pause macro Bill Barclift Excel Programming 0 September 30th 03 09:22 PM


All times are GMT +1. The time now is 10:39 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"