Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Entry Form Gazz_85[_2_] Excel Discussion (Misc queries) 3 September 11th 09 01:18 PM
Data entry form [email protected] Excel Programming 1 March 24th 06 08:50 PM
How to create drill down scope form? jhnagle Excel Programming 0 October 26th 05 05:58 PM
Data Entry Form (similar to default Excel DataForm) tonydm Excel Programming 0 October 11th 05 07:59 PM
Data Entry on a Form Chrissy[_4_] Excel Programming 5 July 20th 03 05:12 AM


All times are GMT +1. The time now is 06:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"