I have the following button on a Form:
Private Sub CommandButton1_Click()
Dim pass As String
pass = UserForm1.TextBox1
Unload UserForm1
End Sub
I then have a Module called Module1:
Public Sub Login()
...
UserForm1.Show
driver.findElementByName("PASSWORD").SendKeys pass
...
End Sub
The idea is whatever password the users enters into the input box will be assigned to the variable pass
. What I'm having trouble doing however is passing pass
from UserForm1 into Module1's Login sub.
I would of thought adding something like Module1.Login (pass)
to my form before I unload it would work, however that doesn't seem to pass anything. Any help would be much appreciated. Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…