Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: VB SendKeys and DropDown Lists
12-21-2011, 03:13 PM #1
- Join Date
- Sep 2005
- Thanked 0 Times in 0 Posts
VB SendKeys and DropDown Lists
Is this the right place for Visual Basic questions? Hope so...
I've started exploring SendKeys that send keystrokes and commands to other applications. So far I'm making good progress and able to send combinations of Alt, Shift, Ctrl + key commands to select from menus and mirror what I do manually.
However my first stumbling block has been to send an Alt+Key command to select a DropDown list on a page in the application, and then select an entry from it.
Other Alt+keys work okay on that page to change radio buttons and so forth. But I can't seem to select and change a list item.
I've tried putting a TimeValue wait as well as various combinations.
%f selects the list (and it seems to flash and underline the list name when I run it).
But I can't select the letter W for instance to select the list item that begins with W, like I can manually
One of several tryouts includes the following:
Application.Wait (Now + TimeValue("0:00:01"))
Where ALT+F selects the drop down list on the page, and W takes me to the word WORK in the list.
But I've also tried Sendkeys ("%f"), True or SendKeys ("%fw")
By the way does that last example mean it's Alt+f followed by the W key?
Any help or advise would be most welcome