View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Numbers Only in input box

you could try the inputbox method (versus inputbox function). it will
restrict the input to numbers, but you still have to check to see if they
canceled the inputbox.

Sub test()
Dim checker As Long

checker = Clng(Application.InputBox("What is the player's registration
number?", Type:=1))
If checker = 0 Then Exit Sub

End Sub






"Greg" wrote:

Hi all,

Just wondering how I can have the following code to check if the answer is
only in numeric form?

dim Checker

checker = inputbox("What is the player's registration number?")


Thanks in advance

Greg