Can someone help please, i can't seem to get the below to work
Sub Automate_IE_Load_Page() 'This will load a webpage in IE Dim i As Long Dim URL As String Dim IE As InternetExplorer Dim objElement As Object Dim objCollection As Object 'Create InternetExplorer Object Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True URL = "https://Whatever" 'Not putting the URL up here IE.Navigate URL Do Until IE.ReadyState = 4: DoEvents: Loop IE.Document.getElementbyid("menuoptionCell_Excel2007+").Click '(Fails here) 'Set Button = IE.Document.getElementbyid("menuoptionCell_Excel2007+") 'Button.Click End Sub i have also tried
IE.Document.getElementsbyClass("contextMenuOptionTextCell")(0).Click It is saying i need an object. I have tried different methods but none seem to work. I will say i am using the word "Button" loosely as its not actually a button, but not sure what it is called. Below are the identities used on the web page, and i'm not totally sure which i need to press, but neither seem to work
<td class="contextMenuOptionTextCell"> <span class="contextMenuOptionText">Excel 2007+</span></td> <td id="menuoptionCell_Excel2007+" style="vertical-align: top; width: 16px;"></td> thank you
Mike
IE.Document.getElementsbyClass("contextMenuOptionTextCell")(0)orgetElementbyid("menuoptionCell_Excel2007+")actually returns an object?