grimshaw19
New Member
- Joined
- Jan 12, 2005
- Messages
- 24
when i open a program its initiates a splashscreen on a userform with anput box asking for a password. I wanted to verify that the data entered into the cell is integer and hence the contentchk subroutine. However, when running, vba doesnt recognise that anything is typed into the input box and instead returns blankcell. Any ideas whats at fault?!?!
Private Sub UserForm_Click()
On Error GoTo ErrorHandler
inputpassword = Application.InputBox("Please Enter Your Password", "Security:Authorised Users Only", Type:=1)
ContentChk
Exit Sub
ErrorHandler:
MsgBox "The Password is Strictly Integer"
Resume Next
End Sub
Sub ContentChk()
If Application.IsText(ActiveCell) = True Then
MsgBox "The Password is Strictly Integer"
Else
End If
If ActiveCell = "" Then
MsgBox "Blank cell:The Password is Strictly Integer"
Else
End If
If ActiveCell.NumberFormat Then
CheckPassword
Else
If ActiveCell.HasFormula Then
MsgBox "Formula:The Password is Strictly Integer"
Else
End If
End If
If IsDate(ActiveCell.Value) = True Then
MsgBox "Date:The Password is Strictly Integer"
Else
End If
End Sub
Private Sub UserForm_Click()
On Error GoTo ErrorHandler
inputpassword = Application.InputBox("Please Enter Your Password", "Security:Authorised Users Only", Type:=1)
ContentChk
Exit Sub
ErrorHandler:
MsgBox "The Password is Strictly Integer"
Resume Next
End Sub
Sub ContentChk()
If Application.IsText(ActiveCell) = True Then
MsgBox "The Password is Strictly Integer"
Else
End If
If ActiveCell = "" Then
MsgBox "Blank cell:The Password is Strictly Integer"
Else
End If
If ActiveCell.NumberFormat Then
CheckPassword
Else
If ActiveCell.HasFormula Then
MsgBox "Formula:The Password is Strictly Integer"
Else
End If
End If
If IsDate(ActiveCell.Value) = True Then
MsgBox "Date:The Password is Strictly Integer"
Else
End If
End Sub