Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Am not a programmer. I would like to create a button so that the running
macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
VBA does not directly support an indefinite pause. Could you clarify exactly
what you are trying to do? -- Vasant "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brian,
I agree with Vasant. We need a little more information about why you're trying to delay the execution of the macro. Are you saying that you want to click a button that will halt the macro, and then click it again when you want to resume? I don't know about clicking a button, but you can just press CTRL-BREAK, which will halt the code in it's tracks, then press F5 to resume when you're ready. This will also allow you to look at the results on the worksheet so far. Mark "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Vasant/Mark
I'm trying to use an older Excel (.xlm) macro program which works fine with MS Office 2003 Excel, except after the point where the program pauses to accept user inputs (like name, date, etc.). To continue, the user then activates the continue button to enable the program to complete its execution. This button now doesn't work as the current version of Excel doesn't understand it. Can you outline for me the new command code(s) to assign this button to, or another way around it other than the long way as suggested below? Thanks. Brian One suggestion: Add this line to the program after "=Pause()": =Activate("XYZ.xls") (replace XYZ with the worksheet name) Then execute, ToolsMacroMacros....Run (from that line) "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps you could split the macro into two, and run the second part on the
button click. I honestly don't remember much about the old macros any more .... the memory is going ;-). "Brian" wrote in message ... Hi Vasant/Mark I'm trying to use an older Excel (.xlm) macro program which works fine with MS Office 2003 Excel, except after the point where the program pauses to accept user inputs (like name, date, etc.). To continue, the user then activates the continue button to enable the program to complete its execution. This button now doesn't work as the current version of Excel doesn't understand it. Can you outline for me the new command code(s) to assign this button to, or another way around it other than the long way as suggested below? Thanks. Brian One suggestion: Add this line to the program after "=Pause()": =Activate("XYZ.xls") (replace XYZ with the worksheet name) Then execute, ToolsMacroMacros....Run (from that line) "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Perhaps you could split the macro into two, and run the second part on the button click. I honestly don't remember much about the old macros any more ... the memory is going ;-). Nooooo! You misunderstood what I am trying to tell you. I'm not asking for the old macro codes. They work fine under older version of Excel. The program even runs ok under Office 2003 Excel. All I'm after is a new button assigned to a new set of VBA codes running Office 2003 Excel, that tells the program to continue with its macro execution. If you now re-read my original post it will make sense. Brian "Brian" wrote in message ... Hi Vasant/Mark I'm trying to use an older Excel (.xlm) macro program which works fine with MS Office 2003 Excel, except after the point where the program pauses to accept user inputs (like name, date, etc.). To continue, the user then activates the continue button to enable the program to complete its execution. This button now doesn't work as the current version of Excel doesn't understand it. Can you outline for me the new command code(s) to assign this button to, or another way around it other than the long way as suggested below? Thanks. Brian One suggestion: Add this line to the program after "=Pause()": =Activate("XYZ.xls") (replace XYZ with the worksheet name) Then execute, ToolsMacroMacros....Run (from that line) "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brian, I think I understood quite well what you were asking. Here's what
Microsoft says, although the terminology might be out of date now: "In Visual Basic, Applications Edition, there is no built-in equivalent for the MS Excel 4.0 PAUSE() macro function. The Visual Basic code in this article provides an alternative. "You might want to use this code to pause execution of your macro while a user enters data directly in a sheet or manipulates menus." .................................................. ..................... "If you have a single procedure within which you need to pause execution until the user desires to resume execution, split your sub procedure into two halves." http://support.microsoft.com/kb/q131847/ -- Vasant "Brian" wrote in message ... "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Perhaps you could split the macro into two, and run the second part on the button click. I honestly don't remember much about the old macros any more ... the memory is going ;-). Nooooo! You misunderstood what I am trying to tell you. I'm not asking for the old macro codes. They work fine under older version of Excel. The program even runs ok under Office 2003 Excel. All I'm after is a new button assigned to a new set of VBA codes running Office 2003 Excel, that tells the program to continue with its macro execution. If you now re-read my original post it will make sense. Brian "Brian" wrote in message ... Hi Vasant/Mark I'm trying to use an older Excel (.xlm) macro program which works fine with MS Office 2003 Excel, except after the point where the program pauses to accept user inputs (like name, date, etc.). To continue, the user then activates the continue button to enable the program to complete its execution. This button now doesn't work as the current version of Excel doesn't understand it. Can you outline for me the new command code(s) to assign this button to, or another way around it other than the long way as suggested below? Thanks. Brian One suggestion: Add this line to the program after "=Pause()": =Activate("XYZ.xls") (replace XYZ with the worksheet name) Then execute, ToolsMacroMacros....Run (from that line) "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As I use several other Excel 4 macro programs, I don't want to delete this
tool-bar as mentioned in your suggested article. I can physically create or customize my own tool-bar and place a command button in it. I don't need the "pause". What I need is a set of VBA codes "to resume" after the pause. This then will allow me to use other similar Excel 4 macro programs under Office Excel 2003 environment. Can you tell me where I can find this information? Thanks. Brian "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Brian, I think I understood quite well what you were asking. Here's what Microsoft says, although the terminology might be out of date now: "In Visual Basic, Applications Edition, there is no built-in equivalent for the MS Excel 4.0 PAUSE() macro function. The Visual Basic code in this article provides an alternative. "You might want to use this code to pause execution of your macro while a user enters data directly in a sheet or manipulates menus." .................................................. .................... "If you have a single procedure within which you need to pause execution until the user desires to resume execution, split your sub procedure into two halves." http://support.microsoft.com/kb/q131847/ -- Vasant "Brian" wrote in message ... "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Perhaps you could split the macro into two, and run the second part on the button click. I honestly don't remember much about the old macros any more ... the memory is going ;-). Nooooo! You misunderstood what I am trying to tell you. I'm not asking for the old macro codes. They work fine under older version of Excel. The program even runs ok under Office 2003 Excel. All I'm after is a new button assigned to a new set of VBA codes running Office 2003 Excel, that tells the program to continue with its macro execution. If you now re-read my original post it will make sense. Brian "Brian" wrote in message ... Hi Vasant/Mark I'm trying to use an older Excel (.xlm) macro program which works fine with MS Office 2003 Excel, except after the point where the program pauses to accept user inputs (like name, date, etc.). To continue, the user then activates the continue button to enable the program to complete its execution. This button now doesn't work as the current version of Excel doesn't understand it. Can you outline for me the new command code(s) to assign this button to, or another way around it other than the long way as suggested below? Thanks. Brian One suggestion: Add this line to the program after "=Pause()": =Activate("XYZ.xls") (replace XYZ with the worksheet name) Then execute, ToolsMacroMacros....Run (from that line) "Brian" wrote in message ... Am not a programmer. I would like to create a button so that the running macro will continue after a pause. Can someone help me with just that few lines of codes. TIA Brian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a macro be paused to allow input, then continue? | Excel Worksheet Functions | |||
Macro-continue to paste last column | Excel Discussion (Misc queries) | |||
macro to ask yes/no question and continue based on answer | Excel Discussion (Misc queries) | |||
VB code to continue macro | Excel Discussion (Misc queries) | |||
The way to continue do macro recording | Excel Programming |