Hi all,
I am trying to create an inputbox using code from this site:
Code
Sub NumericDataType()
Dim lNum As Long
On Error Resume Next
Application.DisplayAlerts = False
lNum = Application.InputBox _
(Prompt:="Please enter you age.", _
Title:="HOW OLD ARE YOU", Type:=1)
On Error GoTo 0
Application.DisplayAlerts = True
If lNum = 0 Then
Exit Sub
Else
MsgBox "You are " & lNum & " years old."
End If
End Sub
Display More
I get an error on the first line that says, "Compile error: argument not optional". Can anyone help me with this?
Thank you