Community discussion forum

vbinputbox pauses code while it waits on response. How can I reproduce that?

  • 1 year ago
    In my class I have a piece of code that works fine with the vbinputbox. I need to request username and password. Thing is it doesn't have but one textbox to enter in one value. So I thought I might implement a custom form that would allow me to enter in both username and password (in a class). Thing is when I do it that way it doesn't pause the code until user has finished entering information before it processes the next statement in code. Does anyone know of a method that would pause the code until it has received the user information? Example would be great. here is the part that validates username and password. If m_CreatorUserID = "" Then If strUsername = "" Then d_InputMessage = InputBox("Please enter your Lotus Notes ID:", "cXMLHttpMegabyte", "Lotus Notes ID...", 0, 0) If d_InputMessage = "" Then Err.Raise vbObjectError + 1100, "Source=cXMLHttpMegaByte.f_MegaByteAuthenticate", "You can not proceed without entering in your credentials." Exit Function Else m_CreatorUserID = d_InputMessage End If Else m_CreatorUserID = strUsername End If End If If m_CreatorPassword = "" Then If strPassword = "" Then d_InputMessage = InputBox("Please enter your Lotus Notes Password:", "cXMLHttpMegabyte", "Lotus Notes Password...", 0, 0) If d_InputMessage = "" Then Err.Raise vbObjectError + 1100, "Source=cXMLHttpMegaByte.f_MegaByteAuthenticate", "You can not proceed without entering in your credentials." Exit Function Else m_CreatorPassword = d_InputMessage End If Else m_CreatorPassword = strPassword End If End If
  • 1 year ago
    nevermind I figured it out using WaitForSingleObject API.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!