PC Review


Reply
Thread Tools Rate Thread

Drill Down to a Data Entry Web Form

 
 
cleyr
Guest
Posts: n/a
 
      29th Oct 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Entry using Auto Lookup query & Data Entry Form Bob N Microsoft Access Forms 3 28th Oct 2008 07:43 PM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing admin.dataentryoutsourcing@gmail.com Microsoft Access Form Coding 0 20th Mar 2008 12:44 PM
Opening data entry only form from data entry only form for same re =?Utf-8?B?Rmx5bm55?= Microsoft Access Forms 0 5th Sep 2006 08:04 AM
Sandisk Cruzer Drill Drill Drill ben_k Storage Devices 4 6th Dec 2005 01:48 AM
Data Entry Form (similar to default Excel Data>Form) tonydm Microsoft Excel Programming 0 11th Oct 2005 07:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:25 AM.