Jessica,
There are three IF statements in your code, but you put END instead of END
IF for the second closing. That should help. How is the rest of the project
coming? Did you look into changing the entry to stars like in the link I
sent you?
Also, you might be interested in Smart Indenter, a free VBA add in that
helps you clean up your code. Look at it he
http://www.oaltd.co.uk/Indenter/IndentPage.asp
HTH,
Pflugs
"Jessica" wrote:
Good afternoon again.
I have been tinkering with the code examples that have been provided from
yesterday and I have come to a snag in the road, although it mostly works, I
am unable to get the toggle button to act as a password prompter, I'd
appreciate some assistance with the coding if anyone is able to help. Here
is the code I am using now and when I click the toggle button to prompt for a
password, an error comes up with no block if without end if? I am confused
as to what VB is thinking it should be seeing as there are two if block
statements and two end ifs.
Am I missing something simple?
Private Sub ToggleButton1_Click()
Dim x As String
x = InputBoxDK("Type your password here.", "Password Required", "test")
If x = "test" Then
ToggleButton1.Value = True
If ToggleButton1.Value = True Then
'
'
ToggleButton1.Caption = "Refresh Enabled"
StartTimer
Else
'
'
ToggleButton1.Caption = "Refresh Disabled"
End If
If x < "test" Then
MsgBox "You didn't enter the correct password to turn off the refresher."
End
End If
End Sub
Thanks for your time with my learning curve.
Jessica