I am getting this error message when attempting to run a macro in excel 2010:

Run-time error 1004:
Method 'Range' of object '_Global' failed.

When i click debug it takes me to the vba window with my macro code:

Function IsTextAllNumeric(InText As String) As Boolean IsTextAllNumeric = IsNumeric(InText)
End Function
Sub ValidateInputs()
If Not IsTextAllNumeric(Range("CardNum")) Then
MsgBox "Card number must be digits only" & vbCrLf & "Please re-enter the number"
Exit Sub
End If
MsgBox "All entries checked are valid"
End Sub

The line its telling me the error is on is:
If Not IsTextAllNumeric(Range("CardNum")) Then

The macro is attached to a button, and is supposed to check if the entry in a credit card number cell is all numeric, thats it. Unfortunately i'm very new to VB and the macro was given to me in a university assignment, so I can't tell if its a typing error or something more complicated.
Any help is appreciated.