Excel 2000 question.

  • Thread starter Thread starter techjohnny
  • Start date Start date
T

techjohnny

Hello, Group:

I am looking to run a macro that pauses for input. For example to
bend metal, I would like to have the macro ask for number of bends,
then continue in the computation.

Thanks,

--tj
 
Dim numBends As Long

On Error Resume Next
numBends = InputBox("Number of bends")
On Error GoTo 0
If numBends > 0 Then

'rest of code
End If
 
Another one...

dim BendCount as long
bendcount = application.inputbox(Prompt:="how many bends",type:=1)
if bendcount < 1 then
exit sub
elseif bendcount > 333 then
'some sort of typing check -- shouldn't exceed what???
msgbox "that's too many!"
exit sub
end if

Application.inputbox with type:=1 will only accept a number.
 
Back
Top