I wrote this piece of code that should select the fifth option from a dropdown menu in a web page.
Dim title As Variant
Set title = ie3.getElementById("selectedTemplateActivity")
title.selectedIndex = 5
Saying that the fifth option in the dropwdown menu is called "Daily Activities" When I run the code, it is true that the value "Daily Activities" is being populated with the two words "Daily Activities" but it seems like the program doesn't actually CLICK on the options of the dropdown menu.
I am saying this because if i select manually the fifth option of the dropdown menu, some text should appear on the screen as soon as the click is made. This is what i am having trouble with. When i run the macro with this code, it is like the fifth option is not being clicked but the dropdown menu takes the value of "Daily Activities"
Please can you let me know how to fix this ?
Thank you :)