I am trying to get my code to enter text into a new text box in a new frame after a button is pressed. I thought it would be as simple as assigning the value to the text box as the cell contents, but I'm getting:
Run-time error 91 "Object variable or With block variable not set".
Am I missing a Dim
and Set
pair or something? Or does it have something to do with identifying the new frame?
Sub FillInternetForm()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "https://omcoasys.com/sites/DynamicsAx/Project/Enterprise%20Portal/ProjProjectsListPage.aspx?WCMP=PPTB&redirected=1&WMI=EPProjTableList"
IE.Visible = True
While IE.busy
DoEvents
Wend
IE.Document.All("Dynamics.Ax.ActionPane.InitiateProjects.NewGroup.EPProjectWizard-Large").Click
Application.Wait (Now + TimeValue("0:00:02"))
IE.Document.All("ctl00_m_g_d387d089_b21a_4261_b434_b0ecfe6b3378_ctl01_wizProjTableWizard_txtProjGroup").Value = ThisWorkbook.Sheets("sheet1").Range("a1")
End Sub