Jump to content
Macro Express Forums

Find value in dropdown list


patgenn123

Recommended Posts

I always wanted to know if there was a way of searching for a value in a dropdown list , for example, my dropdown list has the 50 states.

 

If I type "A", Alabama comes up, but I really want Arkansas right away.

 

How could a macro actually give me the correct state rather than typing "A" and then down arrow?

 

I've tried a few things, but nothing works.

 

Pat

Link to comment
Share on other sites

It depends on the type of drop down menu. Here are some different methods depending on the type of drop down:

 

Type out the first few letters of the word. You would need to type alab to get Alabama.

Type the first letter of the word several times. Type A four times to get Arkansas.

Type the first letter and then the down arrow button. Type N once and then the down arrow 3 times to get to New Jersey.

 

Unfortunately, drop downs menus, like other controls, are controlled by the operating system and so there is not really a way to alter their performance.

Link to comment
Share on other sites

You may be able to do a Text Type Ctrl-v when the drop down is active to copy the current selection to the clipboard. The macro can then decide if more down arrows (or 'A's) are needed.

 

Another technique is to use Window Control commands. The attached macro uses the Window Control commands to get the selected item in the drop down list. No effort has been made to clean it up to make it a sample for general use. You can try to use it 'as is' or you can just look at it to see the techniques used.

Combo_Select_Contains.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...