whatasks22
New Member
- Joined
- Jan 11, 2019
- Messages
- 5
Hey guys my third post i am sorry. I am new at VBA and trying to interact with what i am think is a GIF i need to click to expand the table. attached is the html and my current code.
and my current vba
HTML:
<div class="A976bc0611e7a4e20b05d61c1efb873f5818" id="Pcda281654e7f49028c2c6bb20cd0566c_1_601" role="navigation" style="width: 34.78mm; display: flex; min-height: 10.57mm; min-width: 34.78mm; justify-content: center; align-items: flex-start; -webkit-align-items: flex-start; -webkit-justify-content: center;" aria-label="Report text"><a tabindex="4" id="Pcda281654e7f49028c2c6bb20cd0566c_1_601_na" aria-expanded="false" aria-labelledby="Pcda281654e7f49028c2c6bb20cd0566c_1_601_aria" style="padding-right: 2px; padding-left: 2px; cursor: pointer;" onkeypress="if(event.keyCode == 13 || event.which == 13){var rp=$get('ReportViewerControl_ctl09_ReportControl');if(rp&&rp.control)rp.control.InvokeReportAction('Toggle','601',event);return false;}" *******="var rp=$get('ReportViewerControl_ctl09_ReportControl');if(rp&&rp.control)rp.control.InvokeReportAction('Toggle','601',event);return false;"><img onerror="this.errored=true;" alt="Expand View Installed Applications" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=14.0.600.490&Name=Microsoft.ReportingServices.Rendering.HtmlRenderer.RendererResources.TogglePlus.gif" border="0"></a><div style="width: 30.12mm; min-width: 30.12mm;">View Installed Applications</div></div>
<a tabindex="4" id="Pcda281654e7f49028c2c6bb20cd0566c_1_601_na" aria-expanded="false" aria-labelledby="Pcda281654e7f49028c2c6bb20cd0566c_1_601_aria" style="padding-right: 2px; padding-left: 2px; cursor: pointer;" onkeypress="if(event.keyCode == 13 || event.which == 13){var rp=$get('ReportViewerControl_ctl09_ReportControl');if(rp&&rp.control)rp.control.InvokeReportAction('Toggle','601',event);return false;}" *******="var rp=$get('ReportViewerControl_ctl09_ReportControl');if(rp&&rp.control)rp.control.InvokeReportAction('Toggle','601',event);return false;"><img onerror="this.errored=true;" alt="Expand View Installed Applications" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=14.0.600.490&Name=Microsoft.ReportingServices.Rendering.HtmlRenderer.RendererResources.TogglePlus.gif" border="0"></a>
<img onerror="this.errored=true;" alt="Expand View Installed Applications" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=14.0.600.490&Name=Microsoft.ReportingServices.Rendering.HtmlRenderer.RendererResources.TogglePlus.gif" border="0">
and my current vba
Code:
Sub Assetgrabber()
Dim myValue As Variant
myValue = InputBox("Asset Tag")
Range("A2").Value = myValue
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "http://spv-msccm-rs02/ReportServer/Pages/ReportViewer.aspx?%2fCustom%2f_Generic%2fDeviceFullReport&rs:Command=Render&CompName=" & Range("A2").Value
ie.Visible = True
Set tdCollection = ieDoc.getElementById("P31bb5549bb3a43b6883baf411089c331_1_601_na").getElementsByTagName("td")
For Each Cell In tdCollection
If Cell.ID = toFind Then
Cell.FireEvent ("***********")
Cell.FireEvent ("onmousedown")
Cell.FireEvent ("onmouseup")
Exit Sub
End If
Next
End Sub
Last edited by a moderator: