Sub Sample() Dim a As Variant a = InputBox("数値または文字を入力してください") If IsNumeric(a) Then MsgBox a & "は数値です" Else MsgBox a & "は文字です" End If End Sub