ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Interrupt code (https://www.excelbanter.com/excel-programming/361214-interrupt-code.html)

srroduin

Interrupt code
 
I have a command button that initiates my code. In the middle of the process
I want to stop the code temporarily so the User can type in values in a
column and then continue on with the rest of the code.

Any suggestions???



Bob Phillips[_14_]

Interrupt code
 
Look at InputBox in VBA help.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"srroduin" wrote in message
...
I have a command button that initiates my code. In the middle of the

process
I want to stop the code temporarily so the User can type in values in a
column and then continue on with the rest of the code.

Any suggestions???





srroduin

Interrupt code
 
I saw this in the help....

Worksheets("Sheet1").Activate
Set myCell = Application.InputBox( _
prompt:="Select a cell", Type:=8)

Is this what you were talking about?

I originally had the User type the numbers into input boxes which were then
put into cells (worked perfectly). They don't want this. They want to type
in the numbers in the cells themselves.

Is there a way to run part of the macro, pause so they can type in numbers
then resume the macro?

I looked at the comments for pausing, but I am not able to type while it is
pausing. I am new at coding so please explain in detail. I'm slowly catching
on to all of this.

I am hesitant to put more command buttons on the worksheet because there are
3 codes that branch off at this point in the macro and there are 3 seperate
macros on the worksheet that all branch off like this. Were talking a
worksheet full of buttons.

Thanks a bunch Bob for your help.


"Bob Phillips" wrote:

Look at InputBox in VBA help.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"srroduin" wrote in message
...
I have a command button that initiates my code. In the middle of the

process
I want to stop the code temporarily so the User can type in values in a
column and then continue on with the rest of the code.

Any suggestions???







All times are GMT +1. The time now is 05:42 PM.

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