Hi All,
I'm very very new to VB and trying my hand at automation of data entry into work webform (ServiceNow) I've tested out the script on Facebook and works perfectly well ;-D
---------------------------------------------------------------
Sub test()
Dim IE As Object
Dim doc As HTMLDocument
Set IE = CreateObject("internetExplorer.Application")
IE.Visible = True
IE.Navigate " https://xlgroup.service-now.com/nav_to.do?uri=%2Fchange_request.do%3Fsys_id%3D-1%26sysparm_stack%3Dchange_request_list.do"
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.Document
doc.getElementById("sys_display.change_request.category").Value = "Application Services.Releases.Insurance"
End Sub
-----------------------------------------------------------------------------
I get the error: method document of object iwebbrowser2 failed
Debug in Yellow: Set doc = IE.Document
-------------------------------------------------------------------------------------
Moreinfo: I have selected in tool - prefer, MS Internet Controls & MS HTML Objects Lib.
I'm very very new to VB and trying my hand at automation of data entry into work webform (ServiceNow) I've tested out the script on Facebook and works perfectly well ;-D
---------------------------------------------------------------
Sub test()
Dim IE As Object
Dim doc As HTMLDocument
Set IE = CreateObject("internetExplorer.Application")
IE.Visible = True
IE.Navigate " https://xlgroup.service-now.com/nav_to.do?uri=%2Fchange_request.do%3Fsys_id%3D-1%26sysparm_stack%3Dchange_request_list.do"
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.Document
doc.getElementById("sys_display.change_request.category").Value = "Application Services.Releases.Insurance"
End Sub
-----------------------------------------------------------------------------
I get the error: method document of object iwebbrowser2 failed
Debug in Yellow: Set doc = IE.Document
-------------------------------------------------------------------------------------
Moreinfo: I have selected in tool - prefer, MS Internet Controls & MS HTML Objects Lib.