mysticmario
Active Member
- Joined
- Nov 10, 2021
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
Hi,
I am here sittign for 3 hours trying to figure out a way to code simple empty check for cell on top of password check and I cannot make it happen, Can you please help me with this code? I am still learning VBA and sometimes computer logic doesnt add up with my lgoic and stuff dont work :D
I wanted to add: And isEmpty(ThisWorkbook.Sheets("Currently logged in").Range("C9").Value = True
to IF statement
and ElseIf isEmpty(ThisWorkbook.Sheets("Currently logged in").Range("C9").Value = False Then msgbox popup
But it doesn't work. I tried multiple different options and code combinations nothing seems to work It's late and I'm exhausted, maybe someone can help me out?
Thank You in advance good people
I am here sittign for 3 hours trying to figure out a way to code simple empty check for cell on top of password check and I cannot make it happen, Can you please help me with this code? I am still learning VBA and sometimes computer logic doesnt add up with my lgoic and stuff dont work :D
VBA Code:
Private Sub IMusinIN_Click()
ivanpin = InputBox("Enter PIN:", Verification)
If ivanpin = 1234 Then
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Currently logged in")
sh.Range("C9").Value = Now
loginvar = MsgBox("Logged in", vbOKOnly, "Login")
Unload Me
Else
MsgBox "Wrong PIN!", vbOKOnly + vbExclamation, "Error"
End If
End Sub
to IF statement
and ElseIf isEmpty(ThisWorkbook.Sheets("Currently logged in").Range("C9").Value = False Then msgbox popup
But it doesn't work. I tried multiple different options and code combinations nothing seems to work It's late and I'm exhausted, maybe someone can help me out?
Thank You in advance good people