J
John Dumay
Hi I have a form that is set as a modal form which propmpts the user for a
password. If successful I want some code to run, otherwise i don't want the
code to run. What i want to do is use this for a number of different codes.
The problem I have is that the underlying code keeps running when I want it
to wait for the answer from the password entry. How do i get the code to wait
until the password form returns a True or False (Variable or function) before
proceding based on that value.
My code looks like this:
Sub BlockedReport()
'Call function to open password form and result = True or False
getPassWord
If getPassWord= True Then
'Do a whole bunch of stuff
Else
'Don't do anything and exit
Exit Sub
End If
End Sub
What happens is it doesn't stop at the 'getPassWord' function and just
continues to run the code before the password can be entered.
Any help ios appreciated.
Regards,
John Dumay
password. If successful I want some code to run, otherwise i don't want the
code to run. What i want to do is use this for a number of different codes.
The problem I have is that the underlying code keeps running when I want it
to wait for the answer from the password entry. How do i get the code to wait
until the password form returns a True or False (Variable or function) before
proceding based on that value.
My code looks like this:
Sub BlockedReport()
'Call function to open password form and result = True or False
getPassWord
If getPassWord= True Then
'Do a whole bunch of stuff
Else
'Don't do anything and exit
Exit Sub
End If
End Sub
What happens is it doesn't stop at the 'getPassWord' function and just
continues to run the code before the password can be entered.
Any help ios appreciated.
Regards,
John Dumay