Comparing Data and Alerting On Differences

nbob

Board Regular
Joined
Nov 9, 2011
Messages
50
Hello I am hopeful that someone can help me on this website. I have had great help in the past with other issues I have come across. What I have now is beyond me as I am a beginner level VBA.

Currently I have to web based data sources that I need to access. Once accessed (this part I have completed thru VBA) I need to enter my file number into one data source sURL1 (data will come from A1-A99999) Once here I will need to grab the ClientID (I can do this with getelements ok got that). This ID will need to be SendKey to my other application which does not have any source code for me to wrk with. Once the ID is entered into this site I will then have the same File open on both windows. I will then need to compare Phone Numbers from one program with the phone numbers in the other program and log any numbers into excel and in line with the appropriate accnt nmbr in "A1".

Sounds confusing but if you can help let me know here is what I have so far just to access the two programs with IE:

Code:
Sub GoToWebSiteAndEnterPWUN()

Dim appIE As Object ' InternetExplorer.Application
Dim sURL As String
Dim UserN As Variant, PW As Variant, PW2 As Variant
Dim ElementCol As Object
Dim AccntNmbr As Variant
Dim btnInput As Object
Dim BttnID As Object
Dim Subframe As Object
Set appIE1 = CreateObject("InternetExplorer.Application")
Set appIE2 = CreateObject("internetExplorer.application")
Set appIE3 = CreateObject("internetExplorer.application")

sURL1 = "http://svrazapp01.progressivefinancial.com/e9system/SIGNON.asp"



With appIE1
    .navigate sURL1
.Visible = True

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 3
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime

Set BttnID = appIE1.Document.getElementbyID("rdoTC")
If BttnID.Value = "Y" Then BttnID.Checked = True
  End With
appIE1.Document.all("btnTC").Click
Do While appIE1.busy
Loop

Set UserN = appIE1.Document.GetElementsByName("txtTheAgent")
If Not UserN Is Nothing Then
    UserN(0).Value = "xxxx"
End If

Set PW = appIE1.Document.GetElementsByName("txtTheInitials") ' password
If Not PW Is Nothing Then
    PW(0).Value = "xx"
End If

Set PW2 = appIE1.Document.GetElementsByName("txtThePassword") ' password
If Not PW2 Is Nothing Then
    PW2(0).Value = "xxxxxxxxxx"
End If

' click 'Submit' button
appIE1.Document.all("btnSubmit").Click
Do While appIE1.busy
Loop

Set AccntNmbr = appIE1.Document.GetElementsByName("txtInquire")
If Not AccntNmbr Is Nothing Then
    AccntNmbr(0).Value = "5037432967" 'this is where I could link to excel range for accnt nmbrs
End If
sURL2 = "https://www.dmcseddebt.com/CRSServicesWeb/jsp/launch.jsp"
With appIE2
 .navigate sURL2
.Visible = True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 12
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
End With

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "{TAB}", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "x", True

Application.SendKeys "{TAB}", True

Application.SendKeys " ", True

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 11
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime

Application.SendKeys "{TAB}", True

Application.SendKeys "{TAB}, True"

Application.SendKeys " ", True
End Sub
So at the end of this code I am now logged into both programs that contain the data I will need to compare sURL1 will be easiest to pull data because it actually has source code to view and allow me to click the links to access phone nmbr data. The sURL2 is difficult because I may need to navigate it with Sendkeys. My problem is getting excell to compare the data once it is pasted to the Sheet. Any Ideas would help I do understand not much for someone to go on without being able to login to the systems but that is not possible. nb
 

Forum statistics

Threads
1,082,346
Messages
5,364,822
Members
400,814
Latest member
gangstar67

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top