We help IT Professionals succeed at work.

screen scrape help

njohnson6378
njohnson6378 asked
on
I have vba code that goes to a website, logs in  and navigates to the page i need to put in the account number. What i want to do is take my list of account numbers 1 at a time from excel put them into the appropriate field then click sunmit. After it is submitted i would like to pull data  from 5 specific fields on the same form and place them into excel in the appropriate column corresponding to the row with the loan number. I have attached a sample file and my code (without the actual website, but i have include the table and form names that correspond to the excel sheet.

form name is "tblloansummary"
the field names are the same as the columns highlighted in yellow on the sample sheet. Let me know if you need anything further. Thank you in advance for your help
Option Explicit
Sub StartHere()
  GetWebDocs "", "secret", True
End Sub
  



Private Sub GetWebDocs(frmLogin As String, txtPassword As String, Optional BrowserVisible As Boolean)
    Dim SignInButton As HTMLInputButtonElement
    Dim ie As WebBrowser, Doc As HTMLDocument, Form As HTMLFormElement
    Dim CLL As Range
    


   
    


    Set ie = Nothing
    Set ie = New InternetExplorer
    ie.Visible = BrowserVisible
    
    Select Case NavigateWithTimeOut(ie, "enterwebsite here", 10, READYSTATE_INTERACTIVE, Doc, "complete")
        Case -1
            'see err
        Case 0
            'OK
        Case 1
            'nav time out
        Case 2
            'doc did not initialize
        Case 3
            'doc timed out
    End Select
   
    Set Form = GWFO(Doc, "getElementsByName", VbMethod, 10, "frmLogin")(0)
    Form("txtUserName").Value = "username"
    Form("txtPassword").Value = "password"
    Form("txtCompany").Value = "xcomany"
    ie.document.all("btnLogin").Click
    Select Case NavigateWithTimeOut(ie, "page where i enter the loan #", 10, READYSTATE_INTERACTIVE, Doc, "complete")
        Case -1
            'see err
        Case 0
            'OK
        Case 1
            'nav time out
        Case 2
            'doc did not initialize
        Case 3
            'doc timed out
    End Select
    'what's next???
End Sub


Private Function NavigateWithTimeOut(ie As WebBrowser, URL As String, TimeOutSeconds As Integer, _
    MinimumState As tagREADYSTATE, Optional GetDoc, Optional DocMinimumState As String) As Integer

    Dim TimeOutTime As Date, Doc As HTMLDocument
    
    NavigateWithTimeOut = -1
    
    ie.navigate URL
    TimeOutTime = DateAdd("s", TimeOutSeconds, Now)
    
    Do Until ie.readyState = MinimumState
        DoEvents
        If Now > TimeOutTime Then
            NavigateWithTimeOut = 1
            Exit Function
        End If
    Loop
    
    If Not IsMissing(GetDoc) Then
        Set Doc = ie.document
        If DocMinimumState = "" Then DocMinimumState = "complete"
        Do Until Doc.readyState = DocMinimumState
            DoEvents
            If Now > TimeOutTime Then
                NavigateWithTimeOut = 3
                Exit Function
            End If
        Loop
    End If
    
    Set GetDoc = Doc
    NavigateWithTimeOut = 0
End Function

Private Function GWFO(Object As Object, ProcName As String, CallType As VbCallType, _
    TimeOutSeconds As Integer, Args) As Object
    
    Dim Res As Object, TimeOutTime As Date
    TimeOutTime = DateAdd("s", TimeOutSeconds, Now)
    
    On Error Resume Next
    Do Until Not Res Is Nothing
        Set Res = CallByName(Object, ProcName, CallType, Args)
        DoEvents
    Loop
    
    Set GWFO = Res
End Function

Private Sub CommandButton1_Click()
    StartHere
End Sub

Open in new window

sample-for-ee.xls
Comment
Watch Question

Eoin RyanI.T. Contractor

Commented:
Hello,

Too many unknowns in this I'm afraid. The format the website returns the query in, it would have to be parsed to extract what you want from it. It can't really be done "on the blind" from what we've to go on.

It would be foolish to put up a legitimate login as it would be publicly viewable, so I can understand why you can't do that.

Author

Commented:
hmmm...
can i provide the source code for the page in question and just remove the web address and login etc? would that be of any help?
The code i have actually logs me into the website and navigates to the page i need.. all i need is for it to grab numbers from column a2:a200 one at a time sand put into box x then submit and then copy and paste data from fields w,x,y,z and paste them into excel for the corresponding row? Do yo think you coudl do that? and i could fill in the table names
Eoin RyanI.T. Contractor

Commented:
Maybe an example page of what gets generated may get it to the point someone could parse the page and get it back into your excel sheet.

Author

Commented:
OK i have attached the source code for the screen to put in the file number in and the source to extract the data.
Any help would be appreciated


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>VALERI Servicer Web Portal</title> 
		<!-- Meta Tags -->
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<!-- Scripts -->
		<script src="Scripts/library.js" type="text/javascript"></script>
		<script src="Scripts/common_calendar.js" type="text/javascript"></script>
		<script language="javascript">
		// local script functions
        function ChangeSearchType()
        {
			// hide all search type regions
			document.getElementById('cntVALoanNumber').style.visibility = 'hidden';
			document.getElementById('cntServicerLoanNumber').style.visibility = 'hidden';
			document.getElementById('cntBorrowerName').style.visibility = 'hidden';
			document.getElementById('cntBorrowerSSN').style.visibility = 'hidden';
			document.getElementById('cntPropertyAddress').style.visibility = 'hidden';
			document.getElementById('cntOrigDateLabel').style.visibility = 'hidden';
			document.getElementById('cntOrigDateFrom').style.visibility = 'hidden';
			document.getElementById('cntOrigDateTo').style.visibility = 'hidden';
        
			var selected = document.getElementById('ddlSearchType').value;
			
			// if the search type is any of the simple types			
			if (selected != 'LoanOriginationDate' && selected != 'EDNSubmittedDate')
			{
				document.getElementById('cnt' + selected).style.visibility = 'visible';
				document.getElementById('txt' + selected).focus();
			}
			
			// otherwise
			if (selected == 'LoanOriginationDate')
			{
				document.getElementById('cntOrigDateLabel').style.visibility = 'visible';
				document.getElementById('cntOrigDateFrom').style.visibility = 'visible';
				document.getElementById('cntOrigDateTo').style.visibility = 'visible';
			}
        }
		</script>
		<!-- Stylesheets --><LINK href="Styles/swp_layout.css" type="text/css" rel="stylesheet"><LINK href="Styles/swp_formatting.css" type="text/css" rel="stylesheet">
		<style type="text/css">A:link { COLOR: #006699 }
	TD { BORDER-RIGHT: 0px; PADDING-RIGHT: 4px; BORDER-TOP: 0px; PADDING-LEFT: 4px; PADDING-BOTTOM: 4px; BORDER-LEFT: 0px; PADDING-TOP: 4px; BORDER-BOTTOM: #dddddd 1px solid }
	.col1 { LEFT: 0px; POSITION: absolute }
	.col1tab { LEFT: 55px; POSITION: absolute }
	.col2 { LEFT: 175px; POSITION: absolute }
	/*[508 Compliance][ndeshmukh][10.29.08] added below style */
	.col2ddl { LEFT: 175px; POSITION: absolute }
	
	.col2short { LEFT: 75px; POSITION: relative }
	.searchregion { LEFT: 10px; TOP: 190px }
	.searchregion_sub1 { LEFT: 10px; TOP: 220px }
	/*[508 Compliance][ndeshmukh][10.29.08] Commented out the below style and modified it inorder to increase the top padding */
	/*.searchregion_sub2 { LEFT: 10px; TOP: 250px }*/
	.searchregion_sub2 { LEFT: 10px; TOP: 290px }
	#gridSearchResults { BORDER-RIGHT: #444444 1px solid; BORDER-TOP: #444444 1px solid; BORDER-LEFT: #444444 1px solid; WIDTH: 775px; BORDER-BOTTOM: #444444 1px solid }
	.GridHeader { BACKGROUND-COLOR: #5475a3;padding : 0.5em 0.5em 0.5em 0.5em;
	margin : 0em 0em 0em 0em; }
	.GridHeader A { COLOR: #ffffff; TEXT-DECORATION: none }
	.GridBodyEven { BACKGROUND-COLOR: #fafafa }
	.GridPager { TEXT-ALIGN: center }
	.StateCol { TEXT-ALIGN: center }
	#cntSearchType { LEFT: 10px; TOP: 100px }
	#cntFilterByRegion { LEFT: 10px; TOP: 130px }
	#cntFilterByStatus { LEFT: 10px; TOP: 160px }
	#cntSearchControl { LEFT: 10px; TOP: 220px }
	/*[508 Compliance][ndeshmukh][10.3.08] Commented out the below style and modified it inorder to make page longer */
	#cntSearchResults { LEFT: 10px; WIDTH: 750px; TOP: 255px; HEIGHT: 285px; } 
/*	#cntSearchResults { LEFT: 10px; WIDTH: 555px; TOP: 260px;  }*/
	#cntOrigDateLabel { LEFT: 425px; POSITION: absolute; TOP: 100px }
	#cntOrigDateFrom { LEFT: 425px; POSITION: absolute; TOP: 130px }
	#cntOrigDateTo { LEFT: 425px; POSITION: absolute; TOP: 160px }
	
		</style>
	</HEAD>
	<body>
		<div class="container" id="cntQuickSearch">
	<!-- [508 Compliance][ndeshmukh][10.20.08] -->
	<div id="hidden">
	<!-- Used to skip navigation for 508 compliance. -->
	<a href="#ContentArea" class="skipLink" tabindex="1" >Skip Navigation</a></div>

	<form name="QuickSearch" id="QuickSearch" method="post" action="/SWP/LoanSearch.aspx?mode=quick">
		<!-- [508 Compliance][ndeshmukh][10.16.08] Added a label for QuickSearch-->
		<label type="label" id="lblLoanQuickSearch" class="sectiontitle">Loan Quick Search</label>
		<input id="txtQuickSearch" type="text" name="txtSearchFor" tabindex="1" maxlength="12" class="slightlysmall bold" title="Enter up to a 12 digit Loan Number here" />
		<input type="image" name="ImgBtn1" id="imgbtnQuickSearch" tabindex="1" src="/SWP/Images/search16.png" alt="Loan Search"   border="0" style="background-color:#426391;" onclick="document.getElementById('QuickSearch').submit();" />
		<!-- <img id="imgQuickSearch" src="/SWP/Images/search16.png" alt="QuickSearch" onclick="document.getElementById('QuickSearch').submit();" /> -->
	</form>
</div>


			<div id="hidden">Please Note: Ensure that JavaScript is enabled in your browser to gain full functionality of VALERI. All clickable column headers are sortable.</div>
		
<div class="container" id="cntMainMenu">
	<img id="imgLogo" src="/SWP/Images/swplogo_new.png" alt="Veterans Affairs Loan Electronic Reporting Interface – Servicer Web Portal" onclick="Navigate('LoanSearch.aspx');" tabindex="2">
	<hr class="menudivider" id="lineMenuDiv1">
	<div class="menuitem" id="cntMenuSearch" >
		<img class="menuicon" Src="/SWP/Images/menu_search.png" alt=""> <span class="menucaption menutext">
			<a href="/SWP/LoanSearch.aspx" style="TEXT-DECORATION: underline" tabindex="3" >Loan Search</a></span>
	</div>
	<div id="mainmenu_pnlTransfer">
	
		<DIV class="menuitem" id="cntMenuTransfer" >
		<IMG class="menuicon" alt="" Src="/SWP/Images/menu_transfer.png">
			<SPAN class="menucaption menulink"><A href="/SWP/TransferLoan.aspx" tabindex="4"  style="Text-decoration:underline">Transfer Loan</A></SPAN>
		</DIV>
	
</div>
	<div class="menuitem" id="cntMenuExit" >
		<img class="menuicon" Src="/SWP/Images/menu_exit.png" alt=""> <span class="menucaption menulink">
			<a href="/SWP/ExitPortal.aspx" style="Text-decoration:underline"  tabindex="5" >Exit Portal</a></span>
	</div>
	<div class="menuitem" id="cntMenuUser" >
		<img class="menuicon" Src="/SWP/Images/menu_user.png" alt=""> <span class="menucaption menulink">
			<a href="/SWP/UserPopup.aspx"target="_blank" style="Text-decoration:underline" tabindex="6">
				
			</a></span>
	</div>
	<hr class="menudivider" id="lineMenuDiv3">
	<div class="container" id="cntCopyright">
		<span class="copyright">© 2008<br>
			Lender Processing Services</span>
	</div>
</div>

		<div class="container" id="cntPageBody">  <a class="skipLink" name="ContentArea" alt="Main Content"></a>
			<!-- PAGE TITLE -->
<div class="container" id="cntTitleBar">
	<!-- [508 Compliance][ndeshmukh][10.20.08] -->
	
	
	<div class="container" id="cntTitleBarIcon">
		<img id="imgTitleBarIcon" src="Images/menu_search.png" alt=""/>
	</div>
	
	<div class="container pagetitle" id="cntTitleBarText">
		Loan Search
	</div>
  <div class="container pagesubtitle" id="cntSubTitleBarText">
    <br/>
    
  </div>
</div>

<!-- PAGE DESCRIPTION -->
<div class="container" id="cntPageDesc">
	<p class="normal">This screen will allow you to find a loan that is serviced by your organization. To begin, select a search type from the menu below. A maximum of 100 results will be returned for any search.</p>
</div><form name="formLoanSearch" method="post" action="LoanSearch.aspx" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'btnSearch')" id="formLoanSearch">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTc3NzY3MDUyNw9kFgICAQ9kFhQCAw8QZGQWAWZkAgkPEA8WBh4NRGF0YVRleHRGaWVsZAUNUHJvcGVydHlTdGF0ZR4ORGF0YVZhbHVlRmllbGQFGVByb3BlcnR5U3RhdGVBYmJyZXZpYXRpb24eC18hRGF0YUJvdW5kZ2QQFTsNVW5pdGVkIFN0YXRlcwZBbG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2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZGQCEw8WAh4HVmlzaWJsZWhkAhUPFgIfA2hkAhcPFgIfA2hkAhkPFgIfA2hkAhsPFgIfA2hkAh0PFgIfA2hkAh8PFgIfA2hkAiMPZBYEAgEPPCsAEQEBEBYAFgAWAGQCAw88KwALAGQYAQUMZ3JkVmlld1JvbGVzD2dkpei33lVzDppp//gdSCdjMsUK/bQ=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['formLoanSearch'];
if (!theForm) {
    theForm = document.formLoanSearch;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/SWP/WebResource.axd?d=Cr6NY1haBII3CUWgTf-vRxkAVYzK1FJ6XORbJp5zHXYb1faJ2WnIXBUQYE-i4nGMszzp_Bd8NNpxf0uVdI32lDKWS0A1&amp;t=634555254680582715" type="text/javascript"></script>


<script src="/SWP/WebResource.axd?d=7qErcjeF3n7l-8Wtuwpfpl7dhaTO2Ezy-juh8r8wV2DMMv8roIP3UK5joLMFD8KoeAp0921xSW-aYXt5_rjRc2aMox41&amp;t=634555254680582715" type="text/javascript"></script>
<div>

	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWSALG+IWVAQKFsfXJDwKz2MamCAK2+oGgAgLB5OeDBALi76mvBwKPh/b4AQLax9vVBgLUo9GDDAKW5fu2BQKW5f+2BQKW5ce3BQKW5ae2BQKU5eO2BQKU5eu2BQKU5Z+2BQKV5dO2BQKV5du2BQKT5f+2BQKQ5eO2BQKh5YO2BQKu5d+2BQKu5f+2BQKu5fe2BQKu5eO2BQKs5Zu2BQKs5cO3BQKt5eO2BQKq5dO2BQKq5d+2BQKq5eO2BQKq5YO2BQKq5fe2BQKq5Zu2BQKq5eu2BQKq5Z+2BQKr5dO2BQKr5Ze2BQKr5Y+2BQKr5Ye2BQKr5fO2BQKr5cO3BQKr5du2BQKr5d+2BQKo5Y+2BQKo5fu2BQKo5ae2BQK55eO2BQKn5YO2BQKk5du2BQKk5d+2BQKl5fe2BQKl5c+3BQKi5Z+2BQKj5Z+2BQKj5eO2BQKg5eO2BQKg5Ze2BQKg5YO2BQKg5cO3BQKW5Zu2BQKU5ce3BQKQ5ZO2BQK55ae2BQKj5YO2BQK/5ce3BQKq5a+2BQKtw+GACgKL+86SAgKs34rGBgLo/a+oDQKln/PuCoJZqtsxVqkues/uLeLOaCXlhL+G" />
</div>
				<!-- SEARCH TYPE -->
				<div class="container" id="cntSearchType">
					<div class="col1"><span class="normal bold"><label for="ddlSearchType" id="Label0">Search Type:</label> </span></div>
					<div class="col2ddl"><select name="ddlSearchType" onchange="javascript:setTimeout(&#39;__doPostBack(\&#39;ddlSearchType\&#39;,\&#39;\&#39;)&#39;, 0)" id="ddlSearchType" class="input normal">
	<option selected="selected" value="VALoanNumber">VA Loan Number</option>
	<option value="ServicerLoanNumber">Servicer Loan Number</option>
	<option value="BorrowerName">Borrower Name</option>
	<option value="PropertyAddress">Property Address</option>
	<option value="LoanOriginationDate">Loan Origination Date</option>

</select><!--&nbsp;<input type="submit" name="btnSelect" value="Select" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnSelect&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnSelect" style="height:20px;width:50px;" />&nbsp;-->
                    </div>
				</div>
				<!-- FILTER BY REGION -->
				<div class="container" id="cntFilterByRegion">
					<div class="col1"><span class="normal bold"><label for="ddlSearchRegion" id="Label1">Filter by Region:</label> </span></div>
					<div class="col2"><select name="ddlSearchRegion" id="ddlSearchRegion" class="input normal">
	<option selected="selected" value="ALL">United States</option>
	<option value="AK">Alaska</option>
	<option value="AL">Alabama</option>
	<option value="AZ">Arizona</option>
	<option value="AR">Arkansas</option>
	<option value="CA">California</option>
	<option value="CO">Colorado</option>
	<option value="CT">Connecticut</option>
	<option value="DE">Delaware</option>
	<option value="DC">District of Columbia</option>
	<option value="FL">Florida</option>
	<option value="GA">Georgia</option>
	<option value="HI">Hawaii</option>
	<option value="ID">Idaho</option>
	<option value="IL">Illinois</option>
	<option value="IN">Indiana</option>
	<option value="IA">Iowa</option>
	<option value="KS">Kansas</option>
	<option value="KY">Kentucky</option>
	<option value="LA">Louisiana</option>
	<option value="ME">Maine</option>
	<option value="MD">Maryland</option>
	<option value="MA">Massachusetts</option>
	<option value="MI">Michigan</option>
	<option value="MN">Minnesota</option>
	<option value="MS">Mississippi</option>
	<option value="MO">Missouri</option>
	<option value="MT">Montana</option>
	<option value="NE">Nebraska</option>
	<option value="NV">Nevada</option>
	<option value="NH">New Hampshire</option>
	<option value="NJ">New Jersey</option>
	<option value="NM">New Mexico</option>
	<option value="NY">New York</option>
	<option value="NC">North Carolina</option>
	<option value="ND">North Dakota</option>
	<option value="OH">Ohio</option>
	<option value="OK">Oklahoma</option>
	<option value="OR">Oregon</option>
	<option value="PA">Pennsylvania</option>
	<option value="RI">Rhode Island</option>
	<option value="SC">South Carolina</option>
	<option value="SD">South Dakota</option>
	<option value="TN">Tennessee</option>
	<option value="TX">Texas</option>
	<option value="UT">Utah</option>
	<option value="VT">Vermont</option>
	<option value="VA">Virginia</option>
	<option value="WA">Washington</option>
	<option value="WV">West Virginia</option>
	<option value="WI">Wisconsin</option>
	<option value="WY">Wyoming</option>
	<option value="AS">American Samoa</option>
	<option value="CZ">Canal Zone</option>
	<option value="GU">Guam</option>
	<option value="PR">Puerto Rico</option>
	<option value="VI">Virgin Islands</option>
	<option value="ZZ">INVALID</option>
	<option value="MP">Northern Mariana Islands</option>

</select></div>
				</div>
				<!-- FILTER BY STATUS -->
				<div class="container" id="cntFilterByStatus">
					<div class="col1"><span class="normal bold"><label for="ddlSearchStatus" id="Label2">Filter by Status:</label></span></div>
					<div class="col2"><select name="ddlSearchStatus" id="ddlSearchStatus" class="input normal">
	<option value="ALL">All Loans</option>
	<option value="DEFAULT">Loans in Default</option>

</select></div>
				</div>
				
				<!-- [508 Compliance][ndeshmukh][10.1.2008] Moved Search button to the end of form controls so taborder would reach the controls first -->
				<!-- SEARCH BUTTON -->
			<!--	<div class="container" id="cntSearchControl"><input type="submit" name="button1" value="Search" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;button1&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="button1" class="stdbutton normal bold" /></div> -->
				
				<!-- VA LOAN NUMBER -->
				<div id="cntVALoanNumber" class="container searchregion">
					<div class="col1"><span class="normal bold"><label for="txtVALoanNumber" id="Label3">VA Loan Number:</label></span></div>
					<div class="col2"><input name="txtVALoanNumber" type="text" maxlength="12" id="txtVALoanNumber" class="input normal" /></div>
				</div>
				<!-- SERVICER LOAN NUMBER -->
				
				<!-- BORROWER NAME -->
				
				<!-- BORROWER SSN -->
				
				<!-- PROPERTY ADDRESS -->
				
				<!-- LOAN ORIGINATION DATE -->
				
				
				
				
				<!-- SEARCH BUTTON -->
				<div class="container" id="cntSearchControl">
				    <input type="submit" name="btnSearch" value="Search" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnSearch&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnSearch" title="Loan Search" class="stdbutton normal bold" />
					<noscript>
                        <p style="color: Red;">Ensure that JavaScript is enabled in your browser to gain full functionality of VALERI. Please enable JavaScript or use a different browser</p>
                    </noscript>
				</div>
				<!-- SEARCH RESULTS -->
				<div id="cntSearchResults" class="container" style="overflow:auto;">
				
				<!-- [508 Compliance]******Test Code********* -->	
				
	<div>

</div>
   
	
	<!-- *************** -->
				
	
	
					</div>
		

<script type="text/javascript">
//<![CDATA[
WebForm_AutoFocus('btnSearch');//]]>
</script>
</form>
		</div>
		
	</body>
</HTML>

Open in new window

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>VALERI Servicer Web Portal</title>
		<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
		<!-- Meta Tags -->
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<!-- Stylesheets -->
		<link href="Styles/swp_layout.css" rel="stylesheet" type="text/css">
		<link href="Styles/swp_formatting.css" rel="stylesheet" type="text/css">
	 
		<style type="text/css">
			.sectionicon { MARGIN-TOP: 2px; WIDTH: 24px; HEIGHT: 24px }
			.subcell { MARGIN-BOTTOM: 2px }
			#tblLoanSummary { BORDER-RIGHT: #666666 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #666666 1px solid; LEFT: 10px; BORDER-LEFT: #666666 1px solid; WIDTH: 305px; BORDER-BOTTOM: #666666 1px solid; POSITION: absolute; TOP: 80px; BORDER-COLLAPSE: collapse }
			#celLoanSummaryTitle { PADDING-RIGHT: 4px; PADDING-LEFT: 8px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px; HEIGHT: 35px; BACKGROUND-COLOR: #5475a3 }
			#LoanSummaryTitleText { MARGIN-TOP: 5px }
			#cntLoanInfo{ position: absolute; top: 80px; height: 510px; left: 5px; width: 314px; border: solid #666666 1px; overflow-y: scroll; overflow-x: hidden; }

			.even { BACKGROUND-COLOR: #f6f6f6 }
			.datacol { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 6px; VERTICAL-ALIGN: top; PADDING-TOP: 6px }
			#cntReportedEvents { LEFT: 325px; TOP: 80px }
			#cntEventsTitle { BORDER-RIGHT: #666666 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: #666666 1px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 4px; OVERFLOW: hidden; BORDER-LEFT: #666666 1px solid; WIDTH: 460px; PADDING-TOP: 4px; BORDER-BOTTOM: #666666 1px solid; HEIGHT: 36px; BACKGROUND-COLOR: #5475a3 }
			#cntEventsTitleText { LEFT: 40px; TOP: 9px }
			#gridEvents { BORDER-RIGHT: #666666 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #666666 1px solid; MARGIN-TOP: -1px; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid }
	    /* [508 Compliance][ndeshmukh][10.13.08] Added style for new GridView. Applied same style as Datagrid */
	    #grdViewEvents { BORDER-RIGHT: #666666 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: #666666 1px solid; MARGIN-TOP: -1px; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid }
	    
			.GridHeader { HEIGHT: 21px; BACKGROUND-COLOR: #dddddd }
			.GridBodyOdd { HEIGHT: 32px }
			.GridBodyEven { HEIGHT: 32px; BACKGROUND-COLOR: #f6f6f6 }
			.GridPager { TEXT-ALIGN: center }
			.EventLink { MARGIN-LEFT: 4px }
			.eventstatusicon { BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 16px; BORDER-BOTTOM: 0px; HEIGHT: 16px }
			#tblLegend { BORDER-RIGHT: #666666 0px solid; BORDER-TOP: #666666 0px solid; MARGIN-TOP: 8px; MARGIN-LEFT: 0px; BORDER-LEFT: #666666 0px solid; WIDTH: 460px; BORDER-BOTTOM: #666666 0px solid; POSITION: relative; BORDER-COLLAPSE: collapse }
			#LegLabel1 { WIDTH: 55px }
			#LegLabel2 { WIDTH: 79px }
			#LegLabel3 { WIDTH: 61px }
			#LegLabel4 { WIDTH: 133px }
			#LegLabel5 { WIDTH: 53px }
			.legicon { WIDTH: 16px; MARGIN-RIGHT: 2px; HEIGHT: 16px }
			#cntEventsFilter { BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; MARGIN-TOP: -1px; BORDER-LEFT: #666666 1px solid; WIDTH: 460px; BORDER-BOTTOM: #666666 1px solid; HEIGHT: 31px }
			#chkShowall { LEFT: 5px; POSITION: absolute; TOP: 40px }
			#lblShowAll { LEFT: 27px; POSITION: absolute; TOP: 43px }
			#txtEventDate_From { LEFT: 145px; WIDTH: 100px; POSITION: absolute; TOP: 40px }
			#imgEventDate_From { LEFT: 250px; POSITION: absolute; TOP: 42px }
			#lblTo { FONT-WEIGHT: bold; LEFT: 274px; POSITION: absolute; TOP: 43px }
			#txtEventDate_To { LEFT: 294px; WIDTH: 100px; POSITION: absolute; TOP: 40px }
			#imgEventDate_To { LEFT: 399px; POSITION: absolute; TOP: 42px }
			#imgGo { LEFT: 430px; POSITION: absolute; TOP: 42px }
		</style>
		<!-- Scripts -->
		<script type="text/javascript" src="Scripts/library.js"></script>
		<script type="text/javascript" src="Scripts/common_calendar.js"></script>
	</HEAD>
	<body>
		<div class="container" id="cntQuickSearch">
	<!-- [508 Compliance][ndeshmukh][10.20.08] -->
	<div id="hidden">
	<!-- Used to skip navigation for 508 compliance. -->
	<a href="#ContentArea" class="skipLink" tabindex="1" >Skip Navigation</a></div>

	<form name="QuickSearch" id="QuickSearch" method="post" action="/SWP/LoanSearch.aspx?mode=quick">
		<!-- [508 Compliance][ndeshmukh][10.16.08] Added a label for QuickSearch-->
		<label type="label" id="lblLoanQuickSearch" class="sectiontitle">Loan Quick Search</label>
		<input id="txtQuickSearch" type="text" name="txtSearchFor" tabindex="1" maxlength="12" class="slightlysmall bold" title="Enter up to a 12 digit Loan Number here" />
		<input type="image" name="ImgBtn1" id="imgbtnQuickSearch" tabindex="1" src="/SWP/Images/search16.png" alt="Loan Search"   border="0" style="background-color:#426391;" onclick="document.getElementById('QuickSearch').submit();" />
		<!-- <img id="imgQuickSearch" src="/SWP/Images/search16.png" alt="QuickSearch" onclick="document.getElementById('QuickSearch').submit();" /> -->
	</form>
</div>


<div class="container" id="cntMainMenu">
	<img id="imgLogo" src="/SWP/Images/swplogo_new.png" alt="VALERI Servicer Web Portal" onclick="Navigate('LoanSearch.aspx');"
		tabindex="2">
	<hr class="menudivider" id="lineMenuDiv1">
	<div class="menuitem" id="cntMenuSearch">
		<img class="menuicon" src="/SWP/Images/menu_search.png" alt=""> <span class="menucaption menutext">
			<a href='/SWP/LoanSearch.aspx' tabindex="3">Loan Search</a> </span>
	</div>
	<div id="mainmenu_pnlTransfer">
	
		<div class="menuitem" id="cntMenuTransfer"><img class="menuicon" alt="" src="/SWP/Images/menu_transfer.png">
			<span class="menucaption menutext"><A tabindex="4" href="/SWP/TransferLoan.aspx">Transfer 
					Loan</A></span>
		</div>
	
</div>
	<div class="menuitem" id="cntMenuExit">
		<img class="menuicon" src="/SWP/Images/menu_exit.png" alt=""> <span class="menucaption menutext">
			<a href='/SWP/ExitPortal.aspx' tabindex="5">Exit Portal</a> </span>
	</div>
	<div class="menuitem" id="cntMenuUser">
		<img class="menuicon" src="/SWP/Images/menu_user.png" alt="" >
		<span class="menucaption menutext"><a href="/SWP/UserPopUp.aspx" target="_blank" tabindex="6">
				
			</a></span>
	</div>
	<hr class="menudivider" id="lineMenuDiv2">
	<div class="menuitem" id="cntMenuLoanInfo">
		<img class="menuicon" src="/SWP/Images/menu_info.png" alt=""> <span class="menucaption menutext">
			<a href='/SWP/LoanInfo.aspx' tabindex="7">Loan Information</a></span>
	</div>
	<div id="mainmenu_pnlReportEvent">
	
		<div class="menuitem" id="cntMenuEvents"><img class="menuicon" alt="" src="/SWP/Images/menu_event.png">
			<span class="menucaption menutext"><A tabindex="8" href="/SWP/ReportEvents.aspx">Report 
					an Event</A></span>
		</div>
	
</div>
	<div id="mainmenu_pnlDoc">
	
		<div class="menuitem" id="cntMenuDocuments"><img class="menuicon" alt="" src="/SWP/Images/menu_document.png">
			<span class="menucaption menutext"><A tabindex="9" href="/SWP/Documents.aspx">Submit 
					Documents</A></span>
		</div>
	
</div>
	<div id="mainmenu_pnlAppeal">
		
		<div class="menuitem" id="cntMenuAppeals"><img class="menuicon" alt="" src="/SWP/Images/menu_appeal.png">
			<span class="menucaption menutext"><A tabindex="10" href="/SWP/Appeals.aspx">Appeals</A></span>
		</div>
	
</div>
	<div id="mainmenu_pnlPaymentHistory">
	
		<div class="menuitem" id="cntMenuPaymentHistory"><img class="menuicon" alt="" src="/SWP/Images/PaymentHistory.PNG">
			<span class="menucaption menutext"><A tabindex="11" href="/SWP/AccessPaymentHistory.aspx">Payment History</A></span>
		</div>
	
</div>
	<div id="mainmenu_pnlPreApproval">
	
		<div class="menuitem" id="div1"><img class="menuicon" alt="" src="/SWP/Images/PreApproval.PNG">
			<span class="menucaption menutext"><a tabindex="12" href="/SWP/PreApproval.aspx">Pre-Approval</a></span>
		</div>
	
</div>
	<hr class="menudivider" id="lineMenuDiv3">
	<div class="container" id="cntCopyright">
		<span class="copyright">VALERI Powered By LPS Desktop 

<br>
			Copyright © 2008 Lender Processing Services</span>
	</div>
</div>

		<div class="container" id="cntPageBody" style="left: 201px; top: 5px; height: 600px">  <a class="skipLink" name="ContentArea" alt="Main Content"></a>
			<!-- PAGE TITLE -->
<div class="container" id="cntTitleBar">
	<!-- [508 Compliance][ndeshmukh][10.20.08] -->
	
	
	<div class="container" id="cntTitleBarIcon">
		<img id="imgTitleBarIcon" src="Images/menu_info.png" alt=""/>
	</div>
	
	<div class="container pagetitle" id="cntTitleBarText">
		Loan Information
	</div>
  <div class="container pagesubtitle" id="cntSubTitleBarText">
    <br/>
    For Loan #181860851255
  </div>
</div>

<!-- PAGE DESCRIPTION -->
<div class="container" id="cntPageDesc">
	<p class="normal">This screen is used to view information and submitted events for an individual loan that your organization services.</p>
</div><form name="formEvent" method="post" action="LoanInfo.aspx?LoanId=7190346&amp;LIN=181860851255" onsubmit="javascript:return WebForm_OnSubmit();" id="formEvent">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS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sbAUFaW1nR28FDWdyZFZpZXdFdmVudHMPPCsADAEIAgdk0M6kxWfO/I/e2wxD3/NV5vt8M5c=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['formEvent'];
if (!theForm) {
    theForm = document.formEvent;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/SWP/WebResource.axd?d=Cr6NY1haBII3CUWgTf-vRxkAVYzK1FJ6XORbJp5zHXYb1faJ2WnIXBUQYE-i4nGMszzp_Bd8NNpxf0uVdI32lDKWS0A1&amp;t=634555251312209352" type="text/javascript"></script>


<script src="/SWP/WebResource.axd?d=SNhGNua5bytowQD_ES8ruTO4SCXXbtwK-lJPxXcl8mOmp64T4XpO5IObsf1rP-ugdukaf6Id84UYZkzqgspHp55pLaY1&amp;t=634555251312209352" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</script>

<div>

	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBwKo7Yb/AgLcv8vxDQLMkZSaBQL06bWWBQKryeHrBgLaiJ/7CQL2tKpAPcfyqdX2HVK4t2RSRDoAlYhFcN8=" />
</div>
				<!-- LOAN SUMMARY -->
				<div id="cntLoanInfo">

				<table id="tblLoanSummary" style="left: 0px; top: 0px" >
					<tr>
						<td id="celLoanSummaryTitle" colspan="2">
							<img class="sectionicon" src="Images/loansummary.png" alt="">
							<div class="container sectiontitle" id="LoanSummaryTitleText">Loan Summary</div>
						</td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblVALoanNumber" id="Label1"> Loan Number:</label></td>
						<td class="datacol normal"><span id="lblVALoanNumber">xxxxxxxxxxxx</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblServicerLoanNumber" id="Label2">Servicer Loan Number:</label></td>
						<td class="datacol normal"><span id="lblServicerLoanNumber">xxxxxxxxx</span></td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblGuarantyStatus" id="Label3">Guaranty Status:</label></td>
						<td class="datacol normal"><span id="lblGuarantyStatus">TerminatedForeclosed</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblLoanTerm" id="Label4">Loan Term:</label></td>
						<td class="datacol normal"><span id="lblLoanTerm">360 months</span></td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblLoanAmount" id="Label5">Loan Amount:</label></td>
						<td class="datacol normal"><span id="lblLoanAmount">$147,120.00</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblNetValue" id="Label6">Net Value:</label></td>
						<td class="datacol normal"><span id="lblNetValue">$123,382.00</span></td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblNOVIssueDate" id="Label16">NOV Issue:</label></td>
						<td class="datacol normal"><span id="lblNOVIssueDate">8/12/2011</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblNOVExpiration" id="Label7">NOV Expiration:</label></td>
						<td class="datacol normal"><span id="lblNOVExpiration">2/7/2012</span></td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblInterestRate" id="Label8">Interest Rate:</label></td>
						<td class="datacol normal"><span id="lblInterestRate">4.5000%</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblLoanOriginationDate" id="Label9">Origination Date:</label></td>
						<td class="datacol normal"><span id="lblLoanOriginationDate">5/21/2009</span></td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblLoanTerminationDate" id="Label10">Termination Date:</label></td>
						<td class="datacol normal"><span id="lblLoanTerminationDate">11/14/2011</span></td>
					</tr>
				    <tr class="datarow even">
						<td class="datacol normal bold"><label for="lblLoanUPB" id="Label14">UPB:</label></td>
						<td class="datacol normal"><span id="lblLoanUPB">$143,284.43</span></td>
					</tr>
					 <tr class="datarow even">
						<td class="datacol normal bold"><label for="lblCurrentGuaranty" id="Label17">Current Guaranty:</label></td>
						<td class="datacol normal"><span id="lblCurrentGuaranty">25.0000%</span></td>
					</tr>
					 <tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblOriginalGuarantyPercent" id="Label18">Original Guaranty %:</label></td>
						<td class="datacol normal"><span id="lblOriginalGuarantyPercent">25.0000%</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblOriginalGuarantyAmount" id="Label20">Original Guaranty $:</label></td>
						<td class="datacol normal"><span id="lblOriginalGuarantyAmount">$36,780.00</span></td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold"><label for="lblBorrowerName" id="Label11">Borrower Name:</label></td>
						<td class="datacol normal"><span id="lblBorrowerName">MICHAEL FRANCIS RAILEY</span></td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblPropertyAddress_Line1" id="Label12">Property Address:</label></td>
						<td class="datacol normal">
							<div class="subcell"><span id="lblPropertyAddress_Line1">309 W HALE ST</span></div>
							<div class="subcell"></div>
							<div class="subcell">
								<span id="lblPropertyAddress_City">BENSON</span>,
								<span id="lblPropertyAddress_State">NC</span>
								<span id="lblPropertyAddress_Zip">27504</span>
								<span id="lblPropertyAddress_ZipSuffix"></span>
							</div>
						</td>
					</tr>
					<tr class="datarow odd">
						<td class="datacol normal bold" style="height: 41px"><label for="lblTechnicianName" id="Label13">Assigned Technician:</label></td>
						<td class="datacol normal" style="height: 41px">
							<div class="subcell"><span id="lblTechnicianName" style="display:inline-block;width:203px;"><a href="mailto:steven.lenling@va.gov">Steven Lenling  (St Paul RLC) </a></span></div>
							<div class="subcell"><span id="lblTechnicianPhone" style="display:inline-block;width:169px;">1-800-827-0611 x5528</span>&nbsp;</div>
						</td>
					</tr>
					<tr class="datarow even">
						<td class="datacol normal bold"><label for="lblPATechnicianName" id="Label15">Post Audit Technician:</label></td>
						<td class="datacol normal">
							<div class="subcell"><span id="lblPATechnicianName" style="display:inline-block;width:220px;">Not Assigned</span></div>
							<div class="subcell"></div>
						</td>
					</tr>
				</table>
				</div>
				<!-- REPORTED EVENTS -->
				<div class="container" id="cntReportedEvents">
					<div id="cntEventsTitle">
						<img class="sectionicon" src="Images/reportedevents.png" alt="">
						<div class="container sectiontitle" id="cntEventsTitleText">Reported Events</div>
					</div>
					<!-- EVENTS FILTER -->
					<div id="cntEventsFilter">
						<input id="chkShowAll" type="checkbox" name="chkShowAll" onclick="javascript:setTimeout(&#39;__doPostBack(\&#39;chkShowAll\&#39;,\&#39;\&#39;)&#39;, 0)" tabindex="11" />
						<span id="lblShowAll" class="normal">Show All</span>
						<label for="txtEventDate_From" visible="false" class="hiddenlabel" id="lblhdn_From">From Date</label>

						<input name="txtEventDate_From" type="text" value="5/21/2009" id="txtEventDate_From" tabindex="12" class="input normal" />
						<img id="imgEventDate_From" tabindex="14" class="image" onclick="OpenCalendar(&#39;formEvent.txtEventDate_From&#39;);" onkeypress="OpenCalendar(&#39;formEvent.txtEventDate_From&#39;);" src="/SWP/Images/cal.gif" alt="calendar" align="absbottom" style="border-width:0px;" />
						<span id="lblTo" class="normal">to</span>
						<label for="txtEventDate_To" visible="false" class="hiddenlabel" id="lblhdn_To">To Date</label>


						<input name="txtEventDate_To" type="text" value="12/5/2011" id="txtEventDate_To" tabindex="15" class="input normal" />
						<img id="imgEventDate_To" tabindex="16" class="image" onclick="OpenCalendar(&#39;formEvent.txtEventDate_To&#39;);" onkeypress="OpenCalendar(&#39;formEvent.txtEventDate_To&#39;);" src="/SWP/Images/cal.gif" alt="calendar" align="absbottom" style="border-width:0px;" />
						
						<input type="image" name="imgGo" id="imgGo" tabindex="17" class="imagebutton" src="Images/go16.png" alt="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;imgGo&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="border-width:0px;" />
		<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span id="lblFromDateFormat" class="smallprint">Date Format: MM/DD/YYYY</span>		
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span id="lblToDateFormat" class="smallprint">Date Format: MM/DD/YYYY</span>	
			
	<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span id="cvEventDate_From" class="smallprint" style="color:Red;display:none;">* Invalid From Date Format</span>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		 <span id="cvEventDate_To" class="smallprint" style="color:Red;display:none;">* Invalid To Date Format</span>
	<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span id="rfvEventDate_From" class="smallprint" style="color:Red;display:none;">* From Date is required</span>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;
		  <span id="rfvEventDate_To" class="smallprint" style="color:Red;display:none;">* To Date is required</span>
				
					</div>
					
					<div>
	<table cellspacing="0" summary="Events table" border="0" id="grdViewEvents" style="color:Black;background-color:White;border-width:1px;border-style:Solid;border-collapse:collapse;">
		<tr class="GridHeader normal bold">
			<th align="center" scope="col" style="width:228px;">Event Name</th><th align="center" scope="col" style="width:60px;">Status</th><th align="center" scope="col" style="width:80px;">Report Date</th><th align="center" scope="col" style="width:90px;">Process Date</th>
		</tr><tr class="GridBodyEven normal" style="background-color:White;">
			<td style="width:228px;">
									<div class="EventLink" title='Submitted By : N/A'>
										<a href='EventRedirect.aspx?EventId=69696767'>
											Transfer of Custody
										</a>
									</div>
								</td><td align="center" style="width:60px;">
									<a href='EventInfo.aspx?EventId=69696767'>
										<img class="eventstatusicon" src='Images/correct16.png' alt='Accepted' /></a>
								</td><td align="center" style="width:80px;">11/22/11</td><td align="center" style="width:90px;">11/26/11</td>
		</tr><tr class="GridBodyEven normal" style="background-color:WhiteSmoke;">
			<td style="width:228px;">
									<div class="EventLink" title='Submitted By : N/A'>
										<a href='EventRedirect.aspx?EventId=69666631'>
											Results of Sale
										</a>
									</div>
								</td><td align="center" style="width:60px;">
									<a href='EventInfo.aspx?EventId=69666631'>
										<img class="eventstatusicon" src='Images/correct16.png' alt='Accepted' /></a>
								</td><td align="center" style="width:80px;">11/17/11</td><td align="center" style="width:90px;">11/21/11</td>
		</tr><tr class="GridBodyEven normal" style="background-color:White;">
			<td style="width:228px;">
									<div class="EventLink" title='Submitted By : N/A'>
										<a href='EventRedirect.aspx?EventId=68052593'>
											Delinquency Status
										</a>
									</div>
								</td><td align="center" style="width:60px;">
									<a href='EventInfo.aspx?EventId=68052593'>
										<img class="eventstatusicon" src='Images/correct16.png' alt='Accepted' /></a>
								</td><td align="center" style="width:80px;">11/01/11</td><td align="center" style="width:90px;">11/06/11</td>
		</tr><tr class="GridBodyEven normal" style="background-color:WhiteSmoke;">
			<td style="width:228px;">
									<div class="EventLink" title='Submitted By : N/A'>
										<a href='EventRedirect.aspx?EventId=66217139'>
											Delinquency Status
										</a>
									</div>
								</td><td align="center" style="width:60px;">
									<a href='EventInfo.aspx?EventId=66217139'>
										<img class="eventstatusicon" src='Images/correct16.png' alt='Accepted' /></a>
								</td><td align="center" style="width:80px;">10/01/11</td><td align="center" style="width:90px;">10/06/11</td>
		</tr><tr class="GridBodyEven normal" style="background-color:White;">
			<td style="width:228px;">
									<div class="EventLink" title='Submitted By : N/A'>
										<a href='EventRedirect.aspx?EventId=65944507'>
											Foreclosure Sale Scheduled
										</a>
									</div>
								</td><td align="center" style="width:60px;">
									<a href='EventInfo.aspx?EventId=65944507'>
										<img class="eventstatusicon" src='Images/correct16.png' alt='Accepted' /></a>
								</td><td align="center" style="width:80px;">09/07/11</td><td align="center" style="width:90px;">09/11/11</td>
		</tr><tr align="center">
			<td colspan="4">
            <input type="submit" name="grdViewEvents$ctl08$btnPrevious" value="Previous" id="grdViewEvents_ctl08_btnPrevious" disabled="disabled" title="Previous" class="buttonLink" />
            &nbsp;&nbsp;
            <input type="submit" name="grdViewEvents$ctl08$btnNext" value="Next" id="grdViewEvents_ctl08_btnNext" title="Next" class="buttonLink" />
        </td>
		</tr>
	</table>
</div>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="smallprint"> Page
					<span id="lblCurrentIndex">1</span>
					of
					<span id="lblPageCount">7</span></span><br/>
					<table id="tblLegend" border="0" class="normal" cellpadding="0" cellspacing="0" summary="Legend for Reported Events Status">
						<tr>
							<td><img class="legicon" src="Images/pending16.png" alt=""></td>
							<td id="LegLabel1">Pending</td>
							<td><img class="legicon" src="Images/pause16.png" alt=""></td>
							<td id="LegLabel2">Unprocessed</td>
							<td><img class="legicon" src="Images/correct16.png" alt=""></td>
							<td id="LegLabel3">Accepted</td>
							<td><img class="legicon" src="Images/witherrors16.png" alt=""></td>
							<td id="LegLabel4">Accepted with Errors</td>
							<td><img class="legicon" src="Images/fatal16.png" alt=""></td>
							<td id="LegLabel5">Rejected</td>
						</tr>
					</table>
				</div>
			
<script type="text/javascript">
//<![CDATA[
var Page_Validators =  new Array(document.getElementById("cvEventDate_From"), document.getElementById("cvEventDate_To"), document.getElementById("rfvEventDate_From"), document.getElementById("rfvEventDate_To"));
//]]>
</script>

<script type="text/javascript">
//<![CDATA[
var cvEventDate_From = document.all ? document.all["cvEventDate_From"] : document.getElementById("cvEventDate_From");
cvEventDate_From.controltovalidate = "txtEventDate_From";
cvEventDate_From.errormessage = "* Invalid From Date Format";
cvEventDate_From.display = "Dynamic";
cvEventDate_From.type = "Date";
cvEventDate_From.dateorder = "mdy";
cvEventDate_From.cutoffyear = "2029";
cvEventDate_From.century = "2000";
cvEventDate_From.evaluationfunction = "CompareValidatorEvaluateIsValid";
cvEventDate_From.valuetocompare = "1/1/1900";
cvEventDate_From.operator = "GreaterThan";
var cvEventDate_To = document.all ? document.all["cvEventDate_To"] : document.getElementById("cvEventDate_To");
cvEventDate_To.controltovalidate = "txtEventDate_To";
cvEventDate_To.errormessage = "* Invalid To Date Format";
cvEventDate_To.display = "Dynamic";
cvEventDate_To.type = "Date";
cvEventDate_To.dateorder = "mdy";
cvEventDate_To.cutoffyear = "2029";
cvEventDate_To.century = "2000";
cvEventDate_To.evaluationfunction = "CompareValidatorEvaluateIsValid";
cvEventDate_To.valuetocompare = "1/1/1900";
cvEventDate_To.operator = "GreaterThan";
var rfvEventDate_From = document.all ? document.all["rfvEventDate_From"] : document.getElementById("rfvEventDate_From");
rfvEventDate_From.controltovalidate = "txtEventDate_From";
rfvEventDate_From.errormessage = "* From Date is required";
rfvEventDate_From.display = "Dynamic";
rfvEventDate_From.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
rfvEventDate_From.initialvalue = "";
var rfvEventDate_To = document.all ? document.all["rfvEventDate_To"] : document.getElementById("rfvEventDate_To");
rfvEventDate_To.controltovalidate = "txtEventDate_To";
rfvEventDate_To.errormessage = "* To Date is required";
rfvEventDate_To.display = "Dynamic";
rfvEventDate_To.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
rfvEventDate_To.initialvalue = "";
//]]>
</script>


<script type="text/javascript">
//<![CDATA[

var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
    ValidatorOnLoad();
}

function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    else {
        return true;
    }
}
        //]]>
</script>
</form>
		</div>
	</body>
</HTML>

Open in new window

Author

Commented:
Anybody? the code i posted already does the login and navigate to the page.. I have attached the source code files for the rest of it.
NorieAnalyst Assistant

Commented:
There's no attachment. and as far as I can determine the code you've posted is for the navigation or login pages.

This shouldn't be too hard if all you need to get is 5 pieces of data from a form(?) you know the name of.

Does any of the data have a name/id associated with it?

Is the data actually in a table rather than a form?

NorieAnalyst Assistant

Commented:
My apologies.

I had another look at the code and there is a table called tblFormula.

There are also IDs for each item of data in the table.

eg for Transfer Loan the ID is lblVALoanNumber, for Service Loan Number it's  lblServicerLoanNumber etc

So to obtain that data you can try using getElementByID.

Perhaps something like this with the account numbers in column A starting in row 2 and headers across row 1.
Set rngAcctNo = Range("A2") ' reference to first accound number in list

While rngAcctNo <>"" 

  ' code to navigate to page with required data

  '

  rng.Offset(,1).Value = Doc.getElementByID("lblVALoanNumber").innertext

  rng.Offset(,2).Value = Doc.getElementByID("lblServicerLoanNumber").innertext

  ' ,,, and so on until all required values transferred to Excel

  ' move down to next account no
  Set rngAcctNo = rngAcctNo

Wend

Open in new window

You'll need to incorporate your code to submit the account number etc.

You shouldn't only need to login once though.

Author

Commented:
imnorie

yes that would be the correct table. I have added your code to mine and posted the example...just a couple of tweaks and i thing this will be great..I marked the code with the part that needs to be addressed,"'THIS RANGE NEEDS TO BE PUT INTO THE BOX LABELED "ServicerLoanNumber" IN THE FORM "LOAN TO SEARCH AND THEN CLICK SUBMIT SUBMIT BUTTON NAME IS BUTTON SEARCH"

Just to confirm this will paste the data from the "tblformula" with the values i selected to excel correct?
thank you very much for the help
Option Explicit
Sub StartHere()
  GetWebDocs "", "secret", True
End Sub
  



Private Sub GetWebDocs(frmLogin As String, txtPassword As String, Optional BrowserVisible As Boolean)
    Dim SignInButton As HTMLInputButtonElement
    Dim IE As WebBrowser, Doc As HTMLDocument, Form As HTMLFormElement
    Dim CLL As Range
    Dim Btn As Object
    Dim iedoc As Object
    Dim SubmitBtns As Object
    Dim TxtBox As Object
    Dim TxtBoxes As Object
    Dim URL As String
    Dim x As Variant
    Dim rngAcctNo As Variant
    Dim rng As Variant
    Dim highlighting As Variant
   
     
    Set IE = Nothing
    Set IE = New InternetExplorer
    IE.Visible = BrowserVisible
    
    Select Case NavigateWithTimeOut(IE, "https://www.vbavaleri.com/GSM2.0/LoginForm.aspx", 10, READYSTATE_INTERACTIVE, Doc, "complete")
        Case -1
            'see err
        Case 0
            'OK
        Case 1
            'nav time out
        Case 2
            'doc did not initialize
        Case 3
            'doc timed out
    End Select
    Application.Wait Now() + TimeValue("00:00:00")
    Set Form = GWFO(Doc, "getElementsByName", VbMethod, 10, "frmLogin")(0)
    Form("txtUserName").Value = "user"
    Form("txtPassword").Value = "pass"
    Form("txtCompany").Value = "company"
    IE.document.all("btnLogin").Click
    Application.Wait Now() + TimeValue("00:00:03")
    IE.document.all("ctl00$MPContent$rptApplications$ctl02$btnLaunchApp").Click
    
    
    Application.Wait Now() + TimeValue("00:00:05")
  



Set rngAcctNo = Range("A4") ' references to first account number in list
'THIS RANGE NEEDS TO BE PUT INTO THE BOX LABELED "ServicerLoanNumber" IN THE FORM "LOAN TO SEARCH AND THEN CLICK SUBMIT SUBMIT BUTTON NAME IS BUTTON SEARCH

While rngAcctNo <> ""
    
  ' code to navigate to page with required data
  Application.Wait Now() + TimeValue("00:00:03")



  rng.Offset(, 1).Value = Doc.getElementById("lblnetvalue").innerText

  rng.Offset(, 2).Value = Doc.getElementById("lblcurrentguaranty").innerText
 
  rng.Offset(, 3).Value = Doc.getElementById("lbloriginalguaranty").innerText
  
  rng.Offset(, 4).Value = Doc.getElementById("lbloriginalguarantypercent").innerText
  
  rng.Offset(, 5).Value = Doc.getElementById("lbloriginalguaranteeamount").innerText
  
  

  ' move down to next account no
  Set rngAcctNo = rngAcctNo

Wend



  End Sub
  Private Function NavigateWithTimeOut(IE As WebBrowser, URL As String, TimeOutSeconds As Integer, _
    MinimumState As tagREADYSTATE, Optional GetDoc, Optional DocMinimumState As String) As Integer

    Dim TimeOutTime As Date, Doc As HTMLDocument
    
    NavigateWithTimeOut = -1
    
    IE.navigate URL
    TimeOutTime = DateAdd("s", TimeOutSeconds, Now)
    
    Do Until IE.readyState = MinimumState
        DoEvents
        If Now > TimeOutTime Then
            NavigateWithTimeOut = 1
            Exit Function
        End If
    Loop
    
    If Not IsMissing(GetDoc) Then
        Set Doc = IE.document
        If DocMinimumState = "" Then DocMinimumState = "complete"
        Do Until Doc.readyState = DocMinimumState
            DoEvents
            If Now > TimeOutTime Then
                NavigateWithTimeOut = 3
                Exit Function
            End If
        Loop
    End If
    
    Set GetDoc = Doc
    NavigateWithTimeOut = 0
End Function

Private Function GWFO(Object As Object, ProcName As String, CallType As VbCallType, _
    TimeOutSeconds As Integer, Args) As Object
    
    Dim Res As Object, TimeOutTime As Date
    TimeOutTime = DateAdd("s", TimeOutSeconds, Now)
    
    On Error Resume Next
    Do Until Not Res Is Nothing
        Set Res = CallByName(Object, ProcName, CallType, Args)
        DoEvents
    Loop
    
    Set GWFO = Res
End Function

Open in new window

Author

Commented:
also i do get a runtime error 91 with variable not set on this lines
rng.Offset(, 1).Value = Doc.getElementById("lblnetvalue").innerText

NorieAnalyst Assistant

Commented:
I don't really follow what you mean.

Yes you need code to enter the account number in form and then submit the form.

In fact you have to do that to move onto the next part where you retrieve the data.

If you don't you could end up with errors like the one you describe.

Thats because before you submit the form, get the result and the page is fully loaded the data you are trying to
retrieve just won't be there.

I'd post code for that but I really don't follow the code you originally posted.

Is that a valid URL for the login page in the code?

Author

Commented:
yes thats a valid url for the page . I posted some code below would that be what i need to put in there? or how would i modify that part of it?
Basically the code I have navigates to the page where the tbl is located to eneter the loan number.
The way the site is setup there is a drop down box that selects the search type in this case I need the option #2 which is the ServicerLoanNumber. this is a textbox on the screen. I eneter the loan number (one at a time) and then click submit. this brings up the info page for the tblFormula. From that table i need the data in the fields to be posted to excel in the corresponding row with the account number. then navigate back to the search page and do it over again until all of the loan numbers i have have been searched. Does that help explain it?

Any help i can give I will, if you need a source page of code or something i can get that for you..Im just really stuck on this and my deadline soon approaching


Set Form = GWFO(Doc, "getElementsByName", VbMethod, 10, "frmLoanSearch")(0)
    Form("ServicerLoanNumber").Value = 'range a4? is this what i need to put there???? or what would this part be? 
IE.document.all("btnSearch").Click

'I think this is the last part of the code I need? Sorry about the code i have copied and spliced from a few different places to get what i needed, not the best way but im an absoluet Novice when it comes to this.

Open in new window

NorieAnalyst Assistant

Commented:
The problem is I've never seen this method to do this sort of thing.

This is how I would normally do the login part.
Sub GetData()
Dim IE As Object
Dim doc As Object
Dim strURL As String
Dim unmae As Object
Dim pword As Object
Dim cpy As Object
Dim btnSubmit As Object


    strURL = "https://www.vbavaleri.com/GSM2.0/LoginForm.aspx"

    Set IE = CreateObject("InternetExplorer.Application")

    With IE
        .navigate strURL

        Do While .Busy: DoEvents: Loop
        Do While .readyState <> 4: DoEvents: Loop
        .Visible = True

        Set doc = IE.document

        Set uname = doc.getElementById("txtUserName")
        Set pword = doc.getElementById("txtPassWord")

        Set cpy = doc.getElementById("txtCompany")

        Set btnSubmit = doc.getElementById("btnLogin")

        uname.Value = "UserName"

        pword.Value = "PassWord"

        cpy.Value = "Company"

        btnSubmit.Click


    End With

    Set IE = Nothing

End Sub

Open in new window


Aftere btnSubmit.Click you would then navigate to the (search) page where you need to enter the account number.

I think you do that via a button label Loan Search with the ID 'imgbtnQuickSearch'.

For that the code would be something like this:
Set btnGotoSrch = doc.getElementByID("imgbtnQuickSearch")

btnQSrch.Click

Open in new window

Now the browser should be at the page where you do the search.

On that page is a textbox with the ID 'txtQuickSearch' and a button with the ID 'imgbtnQuickSearch'.

The account number is then put in the textbox, the button clicked and the data retrieved.
Set rng = Range("A2")

While rng.Value <>""
    Set txtAccSearch = doc.getElementByID("txtQuickSearch")
    Set btnDoSearch = doc.getElementByID("imgBtnQuicksearch")

   txtAccSearch = rng.Value
   btnDoSearch.Click
    ' wait for page to load and grab data

  Set rng = rng.Offset(1) ' goto next account number.
Wend

Open in new window


That's about as much as I can give you, all the pieces are there.

Author

Commented:
Ok it now navigates to the search the loan page and clicks the submit button to search the loan, but it doesnt add text to the text box.

Is this pulling loan numbers from column "A" and putting the text in the search box?

Option Explicit
Sub StartHere()
  GetWebDocs "", "secret", True
End Sub
  



Private Sub GetWebDocs(frmLogin As String, txtPassword As String, Optional BrowserVisible As Boolean)
    Dim SignInButton As HTMLInputButtonElement
    Dim IE As WebBrowser, doc As HTMLDocument, Form As HTMLFormElement
    Dim CLL As Range
    Dim Btn As Object
    Dim iedoc As Object
    Dim SubmitBtns As Object
    Dim TxtBox As Object
    Dim TxtBoxes As Object
    Dim URL As String
    Dim x As Variant
    Dim rngAcctNo As Variant
    Dim rng As Range
    
    Dim txtAccSearch As Variant
    Dim btndoSearch As Variant
    
     
    Set IE = Nothing
    Set IE = New InternetExplorer
    IE.Visible = BrowserVisible
    
    Select Case NavigateWithTimeOut(IE, "https://www.vbavaleri.com/GSM2.0/LoginForm.aspx", 10, READYSTATE_INTERACTIVE, doc, "complete")
        Case -1
            'see err
        Case 0
            'OK
        Case 1
            'nav time out
        Case 2
            'doc did not initialize
        Case 3
            'doc timed out
    End Select
    Application.Wait Now() + TimeValue("00:00:00")
    Set Form = gwfo(doc, "getElementsByName", VbMethod, 10, "frmLogin")(0)
    Form("txtUserName").Value = "user"
    Form("txtPassword").Value = "pass"
    Form("txtCompany").Value = "company"
    IE.document.all("btnLogin").Click
    Application.Wait Now() + TimeValue("00:00:03")
    IE.document.all("ctl00$MPContent$rptApplications$ctl02$btnLaunchApp").Click
    
        Application.Wait Now() + TimeValue("00:00:03")

  



Set rng = Range("A4")

While rng.Value <> ""
    Set txtAccSearch = doc.getElementById("txtVALoanNumber")
    Set btndoSearch = doc.getElementById("btnSearch")

   txtAccSearch = rng.Value
   btndoSearch.Click
    ' wait for page to load and grab data
    Application.Wait Now() + TimeValue("00:00:05")
  Set rng = rng.Offset(1) ' goto next account number.

  rng.Offset(, 1).Value = doc.getElementById("lblnetvalue").innerText

  rng.Offset(, 2).Value = doc.getElementById("lblcurrentguaranty").innerText
 
  rng.Offset(, 3).Value = doc.getElementById("lbloriginalguaranty").innerText
  
  rng.Offset(, 4).Value = doc.getElementById("lbloriginalguarantypercent").innerText
  
  rng.Offset(, 5).Value = doc.getElementById("lbloriginalguaranteeamount").innerText
  
  

  ' move down to next account no
  Set rngAcctNo = rngAcctNo



Wend



  End Sub
 
  Private Function NavigateWithTimeOut(IE As WebBrowser, URL As String, TimeOutSeconds As Integer, _
    MinimumState As tagREADYSTATE, Optional GetDoc, Optional DocMinimumState As String) As Integer

    Dim TimeOutTime As Date, doc As HTMLDocument
    
    NavigateWithTimeOut = -1
    
    IE.navigate URL
    TimeOutTime = DateAdd("s", TimeOutSeconds, Now)
    
    Do Until IE.readyState = MinimumState
        DoEvents
        If Now > TimeOutTime Then
            NavigateWithTimeOut = 1
            Exit Function
        End If
    Loop
    
    If Not IsMissing(GetDoc) Then
        Set doc = IE.document
        If DocMinimumState = "" Then DocMinimumState = "complete"
        Do Until doc.readyState = DocMinimumState
            DoEvents
            If Now > TimeOutTime Then
                NavigateWithTimeOut = 3
                Exit Function
            End If
        Loop
    End If
    
    Set GetDoc = doc
    NavigateWithTimeOut = 0
End Function
Private Function gwfo(Object As Object, ProcName As String, CallType As VbCallType, _
    TimeOutSeconds As Integer, Args) As Object
    
    Dim Res As Object, TimeOutTime As Date
    TimeOutTime = DateAdd("s", TimeOutSeconds, Now)
    
    On Error Resume Next
    Do Until Not Res Is Nothing
        Set Res = CallByName(Object, ProcName, CallType, Args)
        DoEvents
    Loop
    
    Set gwfo = Res
End Function

Private Sub CommandButton1_Click()
    StartHere
End Sub

Open in new window

Author

Commented:
i did try your code for the login and it works great as well. thank you for that and your help with this

Author

Commented:
if you want to merge this with your code im fine with that too i just really need this to work, my boss is ll over me for this..
NorieAnalyst Assistant

Commented:
I'm not sure what you mean.

I don't understand the how I can merge the code you posted with the code I posted.

The code I posted has all the pieces, in the right order, but needs a few additions.

For example every time you click a button you need code that will wait until the page is loaded before continuing.

This is the code I use to wait for the page to load:
        Do While .Busy: DoEvents: Loop        
        Do While .readyState <> 4: DoEvents: Loop

Open in new window

I can't test beyond the login page because I can't get past that point without valid username, password etc

Author

Commented:
I was referring to just using your  code for the whole thing. Yours is much cleaner and simpler to understand than mine is. I just couldn't get your code to work past the login and navigation point. The only issue I have is that neither your code or my code put the data from colum "a" into the search box. So I was just asking if you could combine the all of the code you gave me so that I know everything is correct
NorieAnalyst Assistant

Commented:
I can try and put the code I posted 'together' but I wouldn't be able to test it.

It would need to be tomorrow though - getting a bit late here.:)

Author

Commented:
Sounds great thank you muchly!!!
Analyst Assistant
Commented:
Here you go.
Option Explicit

Sub GetData()
Dim IE As Object
Dim doc As Object
Dim strURL As String
Dim uname As Object
Dim pword As Object
Dim cpy As Object
Dim btnSubmit As Object
Dim btnDoSearch As Object
Dim btnGotoSrch As Object
Dim txtAccSearch As Object
Dim rngAcct As Range


    strURL = "https://www.vbavaleri.com/GSM2.0/LoginForm.aspx"

    Set IE = CreateObject("InternetExplorer.Application")

    With IE
    
        .navigate strURL

        Do While .Busy: DoEvents: Loop
        Do While .ReadyState <> 4: DoEvents: Loop
        .Visible = True
        Do While doc.ReadyState <> "complete": DoEvents: Loop

        Set doc = IE.document

        Set uname = doc.getElementById("txtUserName")

        Set pword = doc.getElementById("txtPassWord")

        Set cpy = doc.getElementById("txtCompany")

        Set btnSubmit = doc.getElementById("btnLogin")

        uname.Value = "UserName"

        pword.Value = "PassWord"

        cpy.Value = "Company"

        btnSubmit.Click

        Do While .Busy: DoEvents: Loop
        Do While .ReadyState <> 4: DoEvents: Loop
        Do While doc.ReadyState <> "complete": DoEvents: Loop

        Set doc = IE.document

        Set btnGotoSrch = doc.getElementById("imgbtnQuickSearch")

        btnGotoSrch.Click

        Do While .Busy: DoEvents: Loop
        Do While .ReadyState <> 4: DoEvents: Loop
        Do While doc.ReadyState <> "complete": DoEvents: Loop

        Set doc = IE.document

        Set rngAcct = Range("A2")    ' set reference to cell with first account no

        While rng.Value <> ""

            Set txtAccSearch = doc.getElementById("txtQuickSearch")

            Set btnDoSearch = doc.getElementById("imgBtnQuicksearch")

            txtAccSearch = rngAcct.Value

            btnDoSearch.Click

            ' wait for page to load and grab data
            Do While .Busy: DoEvents: Loop
            Do While .ReadyState <> 4: DoEvents: Loop
            Do While doc.ReadyState <> "complete": DoEvents: Loop

            Set doc = IE.document

            rng.Offset(, 1).Value = doc.getElementById("lblnetvalue").innerText
            rng.Offset(, 2).Value = doc.getElementById("lblcurrentguaranty").innerText
            rng.Offset(, 3).Value = doc.getElementById("lbloriginalguaranty").innerText
            rng.Offset(, 4).Value = doc.getElementById("lbloriginalguarantypercent").innerText
            rng.Offset(, 5).Value = doc.getElementById("lbloriginalguaranteeamount").innerText

            Set rngAcct = rngAcct.Offset(1)    ' goto next account number.Wend

        Wend

    End With

    Set IE = Nothing

End Sub

Open in new window

Author

Commented:
You are the best man that works perfectly.. Thank you very much

Author

Commented:
works great