Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Drill Down to a Data Entry Web Form
I have a macro that populates a Web Page with the data from excel. The code
below works well if the HTML page is just a flat data entry page. But when I apply the macro to a Web Page that needs the user to login and click on a button to get into the data entry page, it cannot recognise the web fields in ForeignText.innertext even if the IE.LocationURL matches with the URL I defined in the worksheet Range(K1). Is there a hidden URL I need to drill down and define? How can I do that? HELP Sub MapMeNow() Dim Shell As Object Dim IE As Object Dim response As String Dim strServAcct As String Dim URL As String Dim FldX As Integer Dim ColCount As Integer Dim RangeCount As Integer Dim x As Integer Set Shell = CreateObject("Shell.Application") RangeCount = 2 FldX = 0 ColCount = 0 x = 0 For Each IE In Shell.Windows ' Compare IE URL with URL in Range K1 If TypeName(IE.Document) = "HTMLDocument" And IE.LocationURL = Range("K1").Value Then URL = IE.LocationURL IE.Navigate URL Do While x < 50 Set ForeignCells = Range("A" & RangeCount & ":J" & RangeCount) For Each cell In ForeignCells Set ForeignText = IE.Document.getElementById("H5_EV_DEST$" & x) '1 ForeignText.innertext = cell.Offset(0, ColCount).Value If cell.Offset(0, ColCount).Value = Range("L1").Value Or cell.Offset(0, ColCount).Value = Range("M1").Value Then FldX = 1 ColCount = ColCount + 1 Set ForeignText = IE.Document.getElementById("H5_EV_TC$" & x) '2 ForeignText.innertext = cell.Offset(0, ColCount).Value ColCount = ColCount + 1 If ColCount = 2 Then Exit For Next cell x = x + 1 FldX = 0 RangeCount = RangeCount + 1 ColCount = 0 Loop End If Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Entry Form | Excel Discussion (Misc queries) | |||
Data entry form | Excel Programming | |||
How to create drill down scope form? | Excel Programming | |||
Data Entry Form (similar to default Excel DataForm) | Excel Programming | |||
Data Entry on a Form | Excel Programming |