Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Macro - Make Dropdown List Temporarily Wider | Excel Discussion (Misc queries) | |||
Create new workbook, temporarily name it and copy sheets to it | Excel Programming | |||
Pause a macro? | Excel Programming | |||
Temporarily Disabling an Event Macro | Excel Programming | |||
Pause macro | Excel Programming |