JS Hover Menu using VBA

Darkcloud617

New Member
Joined
Sep 7, 2017
Messages
38
Hello,

I am having an issue regarding "clicking" through a hover drop down menu on a website. The drop down menu looks like this Hover.PNG and is the 6th button from the left on the websites nav bar.



and the website code that refers to that drop down is: hover2.PNG



When you hover over "All Open Orders in view" the class changes from "MenuBar_Menu_Item" to "MenuBar_Menu_Item MenuBar_Menu_Item_Hover". The below is the relevant part of the VBA code I am trying to get to click the option "All Open Orders in view":

VBA Code:
Document.getElementsByClassName("MenuBar_Menu")(1).Click

There is other code "onclick", "onmouseover" etc but im not familiar with incorporating that into VBA. That code errors "object required" but I've tried many different iterations. Any ideas would be greatly appreciated.

Thank you.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Here is another VBA code I am trying but it seems to have the same issue:

VBA Code:
.document.getelementsbyclassname("MenuBar_Menu_Item").document.getelementsbyid("Main_Main_mbMain_5")(0).Click
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top