Comparing Data and Alerting On Differences

nbob

Board Regular
Joined
Nov 9, 2011
Messages
52
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
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top