Hi
I have a sub that asks the user for the number of files they want.
However if user just hits ok the routine should exit gracefully.
Right now if they hit ok with nothing entered, the routine carries on and does not exit.
I know this is basic and I have looked it up and found tonnes on null / is nothing / = 0 etc but it would seem the code does not recognise the empty box as I need it to.
I have to got this right now
I = InputBox("Please enter the required amount", "Enter Amount")
Debug.Print I
If I is nothing Then
Exit Sub
Else
'rest of my routine
Any hints welcome
I have a sub that asks the user for the number of files they want.
However if user just hits ok the routine should exit gracefully.
Right now if they hit ok with nothing entered, the routine carries on and does not exit.
I know this is basic and I have looked it up and found tonnes on null / is nothing / = 0 etc but it would seem the code does not recognise the empty box as I need it to.
I have to got this right now
I = InputBox("Please enter the required amount", "Enter Amount")
Debug.Print I
If I is nothing Then
Exit Sub
Else
'rest of my routine
Any hints welcome