Mr Retirement
New Member
- Joined
- Nov 12, 2016
- Messages
- 46
Hello,
I'm trying to automatically enter my username and password that is prompted from a userform. I'm attempting to use the code below. It works fine without the userform present...but when the userform is the active screen, the macro stops working and is waiting for my input. Is there any code that I can use to type into a userform? I unfortunately do not have access to the actual userform code - I need moreorless a keystroke macro to run when prompted - is this possible?
Thanks,
Mr R.
I'm trying to automatically enter my username and password that is prompted from a userform. I'm attempting to use the code below. It works fine without the userform present...but when the userform is the active screen, the macro stops working and is waiting for my input. Is there any code that I can use to type into a userform? I unfortunately do not have access to the actual userform code - I need moreorless a keystroke macro to run when prompted - is this possible?
Code:
Sub Login()
SendKeys "Username"
SendKeys "{Tab}"
SendKeys "Password"
SendKeys "{Tab}"
SendKeys "{Tab}"
SendKeys "{Enter}"
End Sub
Thanks,
Mr R.