How to CLICK on IE download dialog box i.e.(Open, Save, Save As...)
14,578
Solution 1
I found an easy way by using the TAB key... I modified the code a little:
Application.SendKeys "{TAB 1}", True 'This will select the (OPEN) Tab
Application.SendKeys ("~")
Source: https://www.autoitscript.com/forum/topic/154472-ie-download-saveopen-dialog-how-to-access/
Solution 2
I used the shortcut keys for these. Here they are for IE11.
Note: the code will not run as you expect if IE is not the active window on your machine so it won't work while in debug mode. All this is doing is the equivalent to pressing keys on the keyboard.
Open
- Shortcut key:Alt+O
- VBA:
Application.SendKeys "%{O}"
Save
- Shortcut key:Alt+S
- VBA:
Application.SendKeys "%{S}"
Author by