ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can you pause a macro in excel to input data and continue? (https://www.excelbanter.com/excel-discussion-misc-queries/87078-can-you-pause-macro-excel-input-data-continue.html)

Hutch

Can you pause a macro in excel to input data and continue?
 
I have a spreadsheet that I have to use two or more macros. I have to
change/input numbers in different cells at different places in the process. I
wondered if there was a way to set a pause at these points of input using one
macro with a pause and continue function.

CLR

Can you pause a macro in excel to input data and continue?
 
Here's some sample code to show one way you can input two numbers in two
different cells..........modify to suit

Sub InputData()
Dim k, l 'As Long
k = InputBox("Enter First Number:")
Range("g1").Value = k
l = InputBox("Enter second number:")
Range("g2") = l
End Sub

hth
Vaya con Dios,
Chuck, CABGx3



"Hutch" wrote:

I have a spreadsheet that I have to use two or more macros. I have to
change/input numbers in different cells at different places in the process. I
wondered if there was a way to set a pause at these points of input using one
macro with a pause and continue function.



All times are GMT +1. The time now is 10:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com