pause

G

geebee

hi,

i have some code.. but i want the user to be able to enter a number in a
spreadsheet that will be used in a later part of the code. the number cannot
be entered before the code. it has to be entered in the middle after a
certain part of the code executes. is there any way to do a pause to allow
the use to enter a number/interact with the spreadsheet and then have the
code resume?

thanks in advance,
geebee
 
D

DStrong

Hi geebee-
The most simplistic way is to use an inputbox asking the user to enter data
in it then have the macro write the data to the cell you need it in.

David
 
G

geebee

hi...

but the input/interaction is with radio buttons... is there a good approach
to handlong these?

thanks in advance,
geebee
 
M

Mike H.

Like the other guy said, but here is an example:

Sub testit()
Dim X As Variant

'do your first stuff here....
'now have the code get their input:
Let X = InputBox(prompt:="Please enter the number now")
'now record that value in your cell , example here is D5.
cells(5,4).value=val(X)

'now continue on...

End Sub
 
D

DStrong

The radio box is on the sheets as a Form item or Control Item. If it is a
Form Item, then the radio button can be linked to a cell and the inputbox
data can change the linked cell to what the user chooses.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top