Calling a userform and returning a value
问题 I have a vba code thats Auto_Open. It does some checks then prompts a userform that asks for username and password. I called this userform with userform_name.show . My issue is how can I return a Boolean to my Auto_Open sub from the userform code. I linked the code that verifies if the credentials are correct to the "Login" button on the form. this is the code that produces the Boolean. I need to return it to the Auto_Open. Private Sub loginbutton() Dim bool As Boolean Dim lrup Dim r As Long