PDA

View Full Version : VBA - select a drop-down in a web



lab_harts
05-16-2017, 03:48 AM
I'm sorry, I have very little knowledge in html/vba. I hoping to be able to select from a drop-down (using excel-vba) of a certain page, but alas, most answer/code I saw refers to "id" (which, unfortunately, is NOT present in the one I'm trying to control. Here's the part of the code:


<td width="100%" class="ms-vb" onfocus="OnLink(this)"
href="/sites/.....id=123"
ONCLICK = "GoToLink(this);return false;"
Target = "_self">(no title)<img src= "/_layouts/images/blank.gif"
Class = "ms-hidden" Border=0 Width=1 Height=1
alt= "Use SHIFT+ENTER to open the menu (new window)."</a></td>
<td><img scr="/layouts/images/blank.gif" width=13
style="visibility:hidden" alt=""> </td></tr></table>

I'd really appreciate any help I could get. Thanks a lot!

Leith Ross
05-16-2017, 01:17 PM
Hello lab_harts,

Welcome to the forum. There is not enough information in your post to answer your question. If you can post a copy of your workbook, it will really help a lot.

lab_harts
05-17-2017, 03:18 AM
Hello lab_harts,

Welcome to the forum. There is not enough information in your post to answer your question. If you can post a copy of your workbook, it will really help a lot.


Thanks for the reply sir. I really appreciate it....Alas, I can't share my actual code (since it can only be accessed in our office, but i've tried to use the typical

getElementsByName("").Click /submit
getElementsById("").Click/submit

Too bad, I can only share a part of the page source, and I only have limited (or none at all) resources in our office, because the page/site can only be accessed there. I've already run through the whole page source and I haven't seen any "id" or "name". I believe it is hidden in a form (or something).

Again, thank you.