'Created By: Xavier Arias
'Date Created: JULY 06, 2015
'Date Revised: JANUARY 15, 2016
'Title: FBI_RA_BOOKING
'Reading File from S:\Manual_Booking\BOOKING\RA\NUMBER.csv
Sub FBI_RA_BOOKING()
Dim hostSettleTimeout As Integer
Dim hostSettleTime As Integer
Dim osCurrentScreen As Screen
Dim osCurrentTerminal As Terminal
Dim returnValue As Integer
Dim hiddenTextEntry As String
hostSettleTimeout = 5000
hostSettleTime = 300
Set osCurrentTerminal = ThisFrame.SelectedView.control
Set osCurrentScreen = osCurrentTerminal.Screen
Dim myUser As String
myUser = Environ("username")
'*************************************************************************************************************************************************************
'File Existance to work
'*************************************************************************************************************************************************************
Dim TicketNumberFile As String
TicketNumberFile = InputBox("Enter the CIT Finance Booking Interface File number to continue with the Revolver Account Booking", "CIT FBI", , , vbCritical)
If TicketNumberFile = vbNullString Then
Exit Sub
End If
Dim fso3
Dim folderTicketFilePath As String
Set fso3 = CreateObject("Scripting.FileSystemObject")
folderTicketFilePath = "S:\Manual_Booking\BOOKING\RA"
fileTicket = (TicketNumberFile)
FullPath = (folderTicketFilePath) & "\" & (fileTicket) & ".csv"
If fso3.FileExists(FullPath) Then
Dim Msg As String
Dim Ans As VbMsgBoxResult
' Fill Message string
Msg = "The CIT Finance Booking Interface File exists! Please click ok to continue" & Chr(vbKeyReturn)
Msg = Msg & "Cancel, to abort"
' Set icon to information (question mark)
' Set buttons to OK and Cancel
' Show Message Box
Ans = MsgBox(Msg, vbOKCancel + vbInformation, "CIT FBI")
' If the user clicked cancel...
If Ans = vbCancel Then
Exit Sub
End If
Else
MsgBox "The CIT Finance Booking Interface File does not exist! The file is missing. Verify the booker submitted the form.", vbCritical, "CIT FBI"
Exit Sub
End If
'*************************************************************************************************************************************************************
' ******** Process RA Booking 901.*************************
' Reading File from S:\Manual_Booking\BOOKING\RA\(TICKET NUMBER).csv
MyFile = (FullPath)
Open MyFile For Input As #1 ' Open file for input.
Dim CustName As String
Dim CustAddress1A As String
Dim CustAddress1B As String
Dim CustAddress2 As String
Dim CustAddress3 As String
Dim CustCity As String
Dim CustZip As String
Dim BillingCustName As String
Dim BillingAddress1A As String
Dim BillingAddress1B As String
Dim BillingAddress2 As String
Dim BillingAddress3 As String
Dim BillingCity As String
Dim BillingZip As String
Dim BillingAttn As String
Dim ContactName As String
Dim ContactEmail As String
Dim GuarantorCCAN As String
Dim GuarantorCode As String
Dim GuarantorName As String
Dim GuarantorAddress1A As String
Dim GuarantorAddress1B As String
Dim GuarantorAddress2 As String
Dim GuarantorAddress3 As String
Dim GuarantorCity As String
Dim GuarantorState As String
Dim GuarantorCountry As String
Dim GurantorZip As String
Dim ContactPhone As String
Dim CustID As String
Dim FEDID As String
Dim PurposeOfLoan As String
Dim SICCode As String
Dim InsStatus As String
Dim ContractType As String
Dim MaxCreditAmount As String
Dim MaturityDate As String
Dim PurchaseOrder As String
Dim InvoiceDescription As String
Dim InvoiceCode As String
Dim InvoiceFormat As String
Dim LeadDays As String
Dim InvoiceDueDay As String
Dim LCExempt As String
Dim GracePeriod As String
Dim AssetSerialNumber As String
Dim AssetCode As String
Dim AssetDescription As String
Dim AssetAddress1A As String
Dim AssetAddress1B As String
Dim AssetAddress2 As String
Dim OriginationCode As String
Dim BookingCode As String
Dim VendorApp As String
Dim ApplicationNumber As String
Dim CCEXVLCode As String
Dim LGDIndicator As String
Dim PDIndicator As String
Dim LGDScore As String
Dim PDScore As String
Dim BookedBy As String
Dim CITTicket As String
Dim Category As String
Dim PymtType As String
Dim PayCode As String
Dim DealerAPI1 As String
Dim DealerAPI2 As String
Dim InvoiceNo As String
Dim DeliveryCode As String
Dim SeparateCheck As String
Dim LeadBankA As String
Dim LeadBankB As String
Dim DealerIDA As String
Dim DealerIDB As String
Dim ProductLine As String
Dim ProgramType As String
Dim RelationshipA As String
Dim RelationshipB As String
Dim Region As String
Dim Branch As String
Dim DealerCode As String
Dim RemitCode As String
'*************************************************************************************************************************************************************
' VARIABLES
'*************************************************************************************************************************************************************
Input #1, Id, lessor, CCAN, CustName, CustAddress1A, CustAddress1B, CustAddress2, CustAddress3, CustCity, CustZip, CustCountryCode ' Read data into variables.
Input #1, BillingCustName, BillingAddress1A, BillingAddress1B, BillingAddress2, BillingAddress3, BillingCity, BillingZip, CountryCode, BillingAttn, ContactName, ContactEmail ' Read data into variables.
Input #1, GuarantorCCAN, GuarantorCode, GuarantorName, GuarantorAddress1A, GuarantorAddress1B, GuarantorAddress2, GuarantorAddress3, GuarantorCity, GuarantorState, GuarantorCountry, GurantorZip, GuarantorFEDID, ContactPhone ' Read data into variables.
Input #1, CustID, FEDID, PurposeOfLoan, SICCode, InsStatus, ContractType, CommencementDate, MaxCreditAmount, MaturityDate, PurchaseOrder, InvoiceDescription, InvoiceCode, InvoiceFormat, LeadDays, InvoiceDueDay, FirstPaymentDate, LCExempt, GracePeriod ' Read data into variables.
Input #1, PrincipalFirst, DaysInMonth, DaysInYear, InterestFirstPaymentDate, RateChangeMethod, BaseRateCode, RateVarianceCd, RateVariance ' Read data into variables.
Input #1, ProductLine, ProgramType, RelationshipA, RelationshipB, Region, Branch, LeadBankA, LeadBankB, DealerIDA, DealerIDB, DealerCode, DPaymentPlan, PrivateLabel, RemitCode ' Read data into variables.
Input #1, ListPrice, AssetSerialNumber, AssetCode, AssetDescription, DateEntered, InServiceDate, CountryAsset, AssetZip, AssetAddress1A, AssetAddress1B, AssetAddress2, OriginationCode, BookingCode ' Read data into variables.
Input #1, VendorApp, ApplicationNumber, CCEXVLCode, LGDIndicator, PDIndicator, LGDScore, PDScore, LGDDate, PDEffectiveDate, StopPastDueLtrs, BookedBy, CITTicket, NonNotification ' Read data into variables.
Input #1, BillingCycleCode, BillJan, BillFeb, BillMar, BillApr, BillMay, BillJun, BillJul, BillAug, BillSep, BillOct, BillNov, BillDec ' Read data into variables.
Input #1, Category, PymtType, PayCode, DealerAPI1, DealerAPI2, InvoiceNo, InvoiceDate, DateDue, DeliveryCode, SeparateCheck ' Read data into variables.
'*************************************************************************************************************************************************************
'FORMATTING VARIABLES
'*************************************************************************************************************************************************************
'Format Lessor
lessor = Format(lessor, String(3, "0"))
'Format Lessor
FEDID = Format(FEDID, String(9, "0"))
'Format Lessor
SICCode = Format(SICCode, String(4, "0"))
'Format Program Type
BillingZip = Format(BillingZip, String(5, "0"))
'Format Program Type
GurantorZip = Format(GurantorZip, String(5, "0"))
'Format Program Type
AssetCode = AssetCode & String(7 - Len(AssetCode), "0")
'Format Program Type
AssetZip = Format(AssetZip, String(5, "0"))
'Format Program Type
AssetZip = Format(AssetZip, String(5, "0"))
'Format Commencement Date
CommencementDate = Format(CommencementDate, String(8, "0"))
CommencementDateMM = Mid(CommencementDate, 1, 2)
CommencementDateDD = Mid(CommencementDate, 3, 2)
CommencementDateYYYY = Mid(CommencementDate, 5, 4)
'Format Maturity Date
MaturityDate = Format(MaturityDate, String(8, "0"))
MaturityDateMM = Mid(MaturityDate, 1, 2)
MaturityDateDD = Mid(MaturityDate, 3, 2)
MaturityDateYYYY = Mid(MaturityDate, 5, 4)
'Format DateEntered Date
DateEntered = Format(DateEntered, String(8, "0"))
DateEnteredMM = Mid(DateEntered, 1, 2)
DateEnteredDD = Mid(DateEntered, 3, 2)
DateEnteredYYYY = Mid(DateEntered, 5, 4)
'Format DateEntered Date
InServiceDate = Format(InServiceDate, String(8, "0"))
InServiceDateMM = Mid(InServiceDate, 1, 2)
InServiceDateDD = Mid(InServiceDate, 3, 2)
InServiceDateYYYY = Mid(InServiceDate, 5, 4)
'Format First Payment Date
FirstPaymentDate = Format(FirstPaymentDate, String(8, "0"))
FirstPaymentDateMM = Mid(FirstPaymentDate, 1, 2)
FirstPaymentDateDD = Mid(FirstPaymentDate, 3, 2)
FirstPaymentDateYYYY = Mid(FirstPaymentDate, 5, 4)
'Format Interest First Payment Date
InterestFirstPaymentDate = Format(InterestFirstPaymentDate, String(8, "0"))
InterestFirstPaymentDateMM = Mid(InterestFirstPaymentDate, 1, 2)
InterestFirstPaymentDateDD = Mid(InterestFirstPaymentDate, 3, 2)
InterestFirstPaymentDateYYYY = Mid(InterestFirstPaymentDate, 5, 4)
'Format LGD Date
LGDDate = Format(LGDDate, String(8, "0"))
LGDDateMM = Mid(LGDDate, 1, 2)
LGDDateDD = Mid(LGDDate, 3, 2)
LGDDateYYYY = Mid(LGDDate, 5, 4)
'Format PD Effective Date
PDEffectiveDate = Format(PDEffectiveDate, String(8, "0"))
PDEffectiveDateMM = Mid(PDEffectiveDate, 1, 2)
PDEffectiveDateDD = Mid(PDEffectiveDate, 3, 2)
PDEffectiveDateYYYY = Mid(PDEffectiveDate, 5, 4)
'Format Stop Past Due Ltrs Date
StopPastDueLtrs = Format(StopPastDueLtrs, String(8, "0"))
StopPastDueLtrsMM = Mid(StopPastDueLtrs, 1, 2)
StopPastDueLtrsDD = Mid(StopPastDueLtrs, 3, 2)
StopPastDueLtrsYYYY = Mid(StopPastDueLtrs, 5, 4)
'Format Product Line
ProductLine = Format(ProductLine, String(4, "0"))
'Format Program Type
ProgramType = Format(ProgramType, String(4, "0"))
'Format Relationship
RelationshipA = Format(RelationshipA, String(4, "0"))
RelationshipB = Format(RelationshipB, String(4, "0"))
'Format Region
Region = Format(Region, String(3, "0"))
'Format Branch
Branch = Format(Branch, String(6, "0"))
'Format LeadBank
LeadBankA = Format(LeadBankA, String(3, "0"))
LeadBankB = Format(LeadBankB, String(2, "0"))
'Format DealerID
DealerIDA = Format(DealerIDA, String(6, "0"))
DealerIDB = Format(DealerIDB, String(4, "0"))
'Format DealerAPI
DealerAPI1 = Format(DealerAPI1, String(6, "0"))
DealerAPI2 = Format(DealerAPI2, String(4, "0"))
'Format Invoice Date
InvoiceDate = Format(InvoiceDate, String(8, "0"))
InvoiceDateMM = Mid(InvoiceDate, 1, 2)
InvoiceDateDD = Mid(InvoiceDate, 3, 2)
InvoiceDateYYYY = Mid(InvoiceDate, 5, 4)
'Format Invoice Date
DateDue = Format(DateDue, String(8, "0"))
DateDueMM = Mid(DateDue, 1, 2)
DateDueDD = Mid(DateDue, 3, 2)
DateDueYYYY = Mid(DateDue, 5, 4)
If CustName <> "" Then
'Format CustName
CustName = Format(CustName, ">")
End If
If CustAddress1B <> "" Then
'Format CustAddress1B
CustAddress1B = Format(CustAddress1B, ">")
End If
If CustAddress2 <> "" Then
'Format CustAddress2
CustAddress2 = Format(CustAddress2, ">")
End If
If CustAddress3 <> "" Then
'Format CustAddress3
CustAddress3 = Format(CustAddress3, ">")
End If
If CustCity <> "" Then
'Format CustCity
CustCity = Format(CustCity, ">")
End If
If BillingCustName <> "" Then
'Format BillingCustName
BillingCustName = Format(BillingCustName, ">")
End If
If BillingAddress1B <> "" Then
'Format BillingAddress1B
BillingAddress1B = Format(BillingAddress1B, ">")
End If
If BillingAddress2 <> "" Then
'Format BillingAddress2
BillingAddress2 = Format(BillingAddress2, ">")
End If
If BillingAddress3 <> "" Then
'Format BillingAddress3
BillingAddress3 = Format(BillingAddress3, ">")
End If
If BillingCity <> "" Then
'Format BillingCity
BillingCity = Format(BillingCity, ">")
End If
If BillingAttn <> "" Then
'Format BillingAttn
BillingAttn = Format(BillingAttn, ">")
End If
If ContactName <> "" Then
'Format ContactName
ContactName = Format(ContactName, ">")
End If
If AssetDescription <> "" Then
'Format AssetDescription
AssetDescription = Format(AssetDescription, ">")
End If
If AssetAddress1B <> "" Then
'Format AssetAddress1B
AssetAddress1B = Format(AssetAddress1B, ">")
End If
If AssetAddress2 <> "" Then
'Format AssetAddress2
AssetAddress2 = Format(AssetAddress2, ">")
End If
If GuarantorName <> "" Then
'Format GuarantorName
GuarantorName = Format(GuarantorName, ">")
End If
If GuarantorAddress1B <> "" Then
'Format GuarantorAddress1B
GuarantorAddress1B = Format(GuarantorAddress1B, ">")
End If
If GuarantorAddress2 <> "" Then
'Format GuarantorAddress2
GuarantorAddress2 = Format(GuarantorAddress2, ">")
End If
If GuarantorAddress3 <> "" Then
'Format GuarantorAddress3
GuarantorAddress3 = Format(GuarantorAddress3, ">")
End If
If GuarantorCity <> "" Then
'Format GuarantorCity
GuarantorCity = Format(GuarantorCity, ">")
End If
If GuarantorState <> "" Then
'Format GuarantorState
GuarantorState = Format(GuarantorState, ">")
End If
'*************************************************************************************************************************************************************
'Lease Contract Maintenance
Call MAINT_Contract_Maintenance
Call Wait_50
Call osCurrentScreen.SendKeys(lessor) ' 2 Lessor
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "+"
Call Wait_50
Call Enter_50
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
Dim ContractVar As String
ContractVar = Mid(Line4, 24, 7)
osCurrentScreen.SendKeys "/"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ContractVar) ' Contract Var
Call Wait_50
osCurrentScreen.SendKeys "."
Call Wait_50
osCurrentScreen.SendKeys "901"
Call Wait_50
Call Enter_50
'CCAN IF (CCAN EXIST)
If CCAN <> "" Then
Call osCurrentScreen.SendKeys(CCAN) '3 CCAN
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
'Customer Name/Address
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustName) ' 4 CustName
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustAddress1A) ' 5 CustAddress1A
Call Wait_50
osCurrentScreen.SendKeys " "
Call Wait_50
Call osCurrentScreen.SendKeys(CustAddress1B) ' 6 CustAddress1B
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "3"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustAddress2) ' 7 CustAddress2
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "4"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustAddress3) ' 8 CustAddress3
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line12 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line12 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
Call Enter_50
osCurrentScreen.SendKeys "5"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustCity) 'CustCity
Call Wait_50
Call Enter_50
For x = 1 To 2
Call Enter_50
Next x
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
'Accounts Receivable Name/Address
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingCustName) ' 12 BillingCustName
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAddress1A) ' 13 BillingAddress1A
Call Wait_50
osCurrentScreen.SendKeys " "
Call Wait_50
Call osCurrentScreen.SendKeys(BillingAddress1B) ' 14 BillingAddress1A
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "3"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAddress2) ' 15 BillingAddress2
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "4"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAddress3) ' 16 BillingAddress3
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
Dim CountryVerify As String
CountryVerify = Mid(Line17, 17, 3)
If (CountryVerify) Like "*1*" Then
osCurrentScreen.SendKeys "8"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CountryCode) ' 19 CountryCode
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "7"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingZip) ' 18 BillingZip
Call Wait_50
Call Enter_50
Else
osCurrentScreen.SendKeys "8"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CountryCode) ' 19 CountryCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingZip) ' 18 BillingZip
Call Wait_50
Call Enter_50
End If
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line12 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line12 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
osCurrentScreen.SendKeys "5"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingCity) ' 17 BillingCity
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "9"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAttn) ' 20 BillingAttn
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
'Customer Addresses
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ContactName) ' 21 ContactName
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ContactEmail) ' 22 ContactEmail
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
'Customer/Insurance Data
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustID) '36 CustID
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(FEDID) '37 FEDID
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "15"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(PurposeOfLoan) '38 PurposeOfLoan
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "18"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "A"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(SICCode) '39 SICCode
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If (Line24) Like "*[2750]*SIC*Code*already*exists*" Then
For x = 1 To 2
Call Enter_50
Next x
ElseIf (Line24) Like "*Enter*valid*code*Table*<return>*" Then
Call Enter_50
Else
SICVerifyProcess:
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
Dim SICVerify As String
SICVerify = Mid(Line4, 5, 4) ' Returns Misc Key Number.
If (SICVerify) = (SICCode) Then
For x = 1 To 2
Call Enter_50
Next x
Else
Call Enter_50
osCurrentScreen.SendKeys "D"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(SICVerify) ' First SIC
For x = 1 To 2
Call Enter_50
Next x
GoTo SICVerifyProcess
End If
End If
Call Wait_50
Call Enter_50
'CCAN ELSE (CCAN DOES NOT EXIST)
Else
osCurrentScreen.SendKeys "+"
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
'Customer Name/Address
Call osCurrentScreen.SendKeys(CustName) 'CustName
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustAddress1A) 'CustAddress1A
Call Wait_50
osCurrentScreen.SendKeys " "
Call Wait_50
Call osCurrentScreen.SendKeys(CustAddress1B) 'CustAddress1B
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustAddress2) 'CustAddress2
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustAddress3) 'CustAddress3
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustCountryCode) 'CustCountryCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustZip) 'CustZip
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line12 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line12 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
For x = 1 To 2
Call Enter_50
Next x
osCurrentScreen.SendKeys "5"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustCity) 'CustCity
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CustState) 'CustState
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call Wait_50
'Accounts Receivable Name/Address
Call osCurrentScreen.SendKeys(BillingCustName) 'BillingCustName
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAddress1A) 'BillingAddress1A
Call Wait_50
osCurrentScreen.SendKeys " "
Call Wait_50
Call osCurrentScreen.SendKeys(BillingAddress1B) 'BillingAddress1B
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAddress2) 'BillingAddress2
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAddress3) 'BillingAddress3
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingCountryCode) 'BillingCountryCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingZip) 'BillingZip
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line12 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line12 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
Call Enter_50
osCurrentScreen.SendKeys "5"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingCity) 'BillingCity
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingState) 'BillingState
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "9"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillingAttn) 'BillingAttn
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
Call Wait_50
'Contact Data
Call osCurrentScreen.SendKeys(ContactName) '21 ContactName
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ContactEmail) '22 ContactEmail
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
'Customer Addresses
Call osCurrentScreen.SendKeys(ContactPhone) '35 ContactPhone
Call Wait_50
For x = 1 To 5
Call Enter_50
Next x
'Customer/Insurance Data
If CustID = "" Then
GoTo ContinueAfterCustID
Else
Call osCurrentScreen.SendKeys(CustID) '36 CustID
End If
ContinueAfterCustID:
Call Wait_50
Call Enter_50
If FEDID = "" Then
GoTo ContinueAfterFEDID
Else
Call osCurrentScreen.SendKeys(FEDID) '37 FEDID
End If
ContinueAfterFEDID:
Call Wait_50
For x = 1 To 12
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(PurposeOfLoan) '38 PurposeOfLoan
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
If SICCode = "" Then
Call Enter_50
Else
Call osCurrentScreen.SendKeys(SICCode) '39 SICCode
End If
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(InsStatus) '40 InsStatus
Call Wait_50
For x = 1 To 6
Call Enter_50
Next x
End If
Call Wait_50
'CCAN END IF
'**************************************************************************************************************************************************************************
' CONTINUE PROCESS FOR ALL OUTCOMES
'**************************************************************************************************************************************************************************
' Contract Data
Call osCurrentScreen.SendKeys(ContractType) '41 ContractType
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "Y"
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(CommencementDateMM) ' 26 CommencementDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(CommencementDateDD) ' 26 CommencementDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(CommencementDateYYYY) ' 26 CommencementDateYYYY
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(MaxCreditAmount) ' 27 MaxCreditAmount
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(MaturityDateMM) ' 28 MaturityDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(MaturityDateDD) ' 28 MaturityDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(MaturityDateYYYY) ' 28 MaturityDateYYYY
Call Wait_50
For x = 1 To 6
Call Enter_50
Next x
Call Wait_50
'Contract Invoicing Data
Call osCurrentScreen.SendKeys(PurchaseOrder) ' 45 PurchaseOrder
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(InvoiceDescription) '46 InvoiceDescription
Call Wait_50
'If Len(InvoiceDescription) >= 19 Then
'Call Enter_50
'End If
'If Len(InvoiceDescription) >= 38 Then
' Call Enter_50
'End If
'If Len(InvoiceDescription) >= 57 Then
' Call Enter_50
'End If
'If Len(InvoiceDescription) >= 59 Then
'Call Enter_50
'End If
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(InvoiceCode) '47 InvoiceCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(InvoiceFormat) '48 InvoiceFormat
Call Wait_50
Call Enter_50
If InvoiceCode = "A" Then
Call Wait_50
Call Enter_50
End If
Call osCurrentScreen.SendKeys(LeadDays) '49 LeadDays
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(InvoiceDueDay) '50 InvoiceDueDay
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(FirstPaymentDateMM) '51 FirstPaymentDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(FirstPaymentDateDD) '51 FirstPaymentDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(FirstPaymentDateYYYY) '51 FirstPaymentDateYYYY
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
'Late Charge Data
If LCExempt = "Y" Then
Call osCurrentScreen.SendKeys(LCExempt) '52 LCExempt
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GracePeriod) '53 GracePeriod
Call Wait_50
For x = 1 To 4
Call Enter_50
Next x
'Floating Rate Data
If BillingCycleCode = "M" Then
osCurrentScreen.SendKeys "M" '100 BillingCycleCode
Call Wait_50
Call Enter_50
ElseIf BillingCycleCode = "Q" Then
osCurrentScreen.SendKeys "Q" '100 BillingCycleCode
Call Wait_50
Call Enter_50
End If
Call osCurrentScreen.SendKeys(PrincipalFirst) '54 PrincipalFirst
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DaysInMonth) '55 DaysInMonth
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DaysInYear) '56 DaysInYear
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "1"
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(InterestFirstPaymentDateMM) '56 InterestFirstPaymentDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InterestFirstPaymentDateDD) '56 InterestFirstPaymentDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InterestFirstPaymentDateYYYY) '56 InterestFirstPaymentDateYYYY
Call Wait_50
Call Enter_50
'Rate Change Data
Call osCurrentScreen.SendKeys(RateChangeMethod) '58 RateChangeMethod
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BaseRateCode) '59 BaseRateCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(RateVarianceCd) '60 RateVarianceCd
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(RateVariance) '61 RateVariance
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
osCurrentScreen.SendKeys "M"
Call Wait_50
Call Enter_50
For x = 1 To 6
Call Enter_50
Next x
Else
Call osCurrentScreen.SendKeys(LCExempt) '52 LCExempt
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "C"
Call Wait_50
For x = 1 To 7
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(GracePeriod) '53 GracePeriod
Call Wait_50
For x = 1 To 10
Call Enter_50
Next x
'Floating Rate Data
If BillingCycleCode = "M" Then
osCurrentScreen.SendKeys "M" '100 BillingCycleCode
Call Wait_50
Call Enter_50
ElseIf BillingCycleCode = "Q" Then '100 BillingCycleCode
Call osCurrentScreen.SendKeys(BillJan) '101 BillJan
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillFeb) '102 BillFeb
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillMar) '103 BillMar
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillApr) '104 BillApr
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillMay) '105 BillMay
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillJun) '106 BillJun
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillJul) '107 BillJul
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillAug) '108 BillAug
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillSep) '109 BillSep
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillOct) '110 BillOct
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillNov) '111 BillNov
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BillDec) '112 BillDec
Call Wait_50
Call Enter_50
End If
Call osCurrentScreen.SendKeys(PrincipalFirst) '54 PrincipalFirst
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DaysInMonth) '55 DaysInMonth
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DaysInYear) '56 DaysInYear
Call Wait_50
For x = 1 To 4
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(InterestFirstPaymentDateMM) '57 InterestFirstPaymentDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InterestFirstPaymentDateDD) '57 InterestFirstPaymentDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InterestFirstPaymentDateYYYY) '57 InterestFirstPaymentDateYYYY
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(RateChangeMethod) '58 RateChangeMethod
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BaseRateCode) '59 BaseRateCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(RateVarianceCd) '60 RateVarianceCd
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(RateVariance) '61 RateVariance
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
osCurrentScreen.SendKeys "M"
Call Wait_50
For x = 1 To 7
Call Enter_50
Next x
End If
Call Wait_50
'Call Enter_50
'Skip Internal Codes
For x = 1 To 35
Call Enter_50
Next x
Call Wait_50
If lessor = 753 Or lessor = 901 Then
For x = 1 To 2
Call Enter_50
Next x
End If
For x = 1 To 2
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
Next x
osCurrentScreen.SendKeys "8"
Call Wait_50
Call Enter_50
'Asset Data Maintenance
osCurrentScreen.SendKeys "+"
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
'Asset Description, Cost & Location Data
Call osCurrentScreen.SendKeys(ListPrice) '76 ListPrice
Call Wait_50
For x = 1 To 6
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(AssetSerialNumber) '77 AssetSerialNumber
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(AssetCode) '78 AssetCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(AssetDescription) '79 AssetDescription
Call Wait_50
For x = 1 To 5
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(DateEnteredMM) '79 DateEnteredMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(DateEnteredDD) '79 DateEnteredDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(DateEnteredYYYY) '79 DateEnteredYYYY
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(InServiceDateMM) '80 InServiceDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InServiceDateDD) '80 InServiceDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InServiceDateYYYY) '80 InServiceDateYYYY
Call Wait_50
Call Enter_50
For x = 1 To 7
Call Enter_50
Next x
'Asset Description, Cost & Location Data
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CountryAsset) '80 CountryAsset
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(AssetZip) '81 AssetZip
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line14 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line14 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(AssetAddress1A) '82 AssetAddress1A
Call Wait_50
osCurrentScreen.SendKeys " "
Call Wait_50
Call osCurrentScreen.SendKeys(AssetAddress1B) '83 AssetAddress1B
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(AssetAddress2) '84 AssetAddress2
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "5"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(AssetZip) '81 AssetZip
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line14 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line14 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
For x = 1 To 13
Call Enter_50
Next x
osCurrentScreen.SendKeys "14"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
'User Defined Fields Maintenance
osCurrentScreen.SendKeys "26"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(OriginationCode) '85 OriginationCode
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "27"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(BookingCode) '86 BookingCode
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
'Contract User Defined Fields Maintenance
Call osCurrentScreen.SendKeys(VendorApp) '87 VendorApp
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ApplicationNumber) '88 ApplicationNumber
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "4"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(CCEXVLCode) '89 CCEXVLCode
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(LGDIndicator) '90 LGDIndicator
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "10"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(PDIndicator) '91 PDIndicator
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "13"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(LGDScore) '92 LGDScore
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "14"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(PDScore) '93 PDScore
Call Wait_50
Call Enter_50
If LGDDate <> "" Then
osCurrentScreen.SendKeys "18"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(LGDDateMM) '94 LGDDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(LGDDateDD) '94 LGDDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(LGDDateYYYY) '94 LGDDateYYYY
Call Wait_50
Call Enter_50
End If
If StopPastDueLtrs <> "" Then
osCurrentScreen.SendKeys "19"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(StopPastDueLtrsMM) '96 StopPastDueLtrsMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(StopPastDueLtrsDD) '96 StopPastDueLtrsDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(StopPastDueLtrsYYYY) '96 StopPastDueLtrsYYYY
Call Wait_50
Call Enter_50
End If
If PDEffectiveDate <> "" Then
osCurrentScreen.SendKeys "20"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(PDEffectiveDateMM) '95 PDEffectiveDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(PDEffectiveDateDD) '95 PDEffectiveDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(PDEffectiveDateYYYY) '95 PDEffectiveDateYYYY
Call Wait_50
Call Enter_50
End If
osCurrentScreen.SendKeys "9"
Call Wait_50
Call Enter_50
If BookedBy <> "" Then
'Format CustAddress3
BookedBy = Format(BookedBy, ">")
End If
Call osCurrentScreen.SendKeys(BookedBy) '97 BookedBy
Call Wait_50
osCurrentScreen.SendKeys " TIC"
Call Wait_50
Call osCurrentScreen.SendKeys(CITTicket) '98 CITTicket
Call Wait_50
For x = 1 To 4
Call Enter_50
Next x
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
ContinueAPIReDo:
osCurrentScreen.SendKeys "29"
Call Wait_50
Call Enter_50
'AP Interface Funding Maintenance
Call osCurrentScreen.SendKeys(Category) '114 Category
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(PymtType) '115 PymtType
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "="
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "1"
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(PayCode) '116 PayCode
Call Wait_50
Call Enter_50
ContinueAPIDealer:
Call osCurrentScreen.SendKeys(DealerAPI1) '117 DealerAPI1
Call Wait_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call osCurrentScreen.SendKeys(DealerAPI2) '117 DealerAPI2
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
Dim APIValidDealer1 As String
Dim APIValidDealer2 As String
If (Line5) Like "*DO*NOT*USE*THIS*DEALER*" Then
APIValidDealer = InputBox("Enter a valid Dealer Number to continue booking", "CIT FBI", , , vbCritical)
APIValidDealer1 = Left(ValidDealer, 6)
APIValidDealer2 = Right(ValidDealer, 4)
If APIValidDealer = vbNullString Then
Exit Sub
ElseIf APIValidDealer <> vbNullString Then
DealerAPI1 = ValidDealer1
DealerAPI2 = ValidDealer2
osCurrentScreen.SendKeys "/"
Call Wait_50
Call Enter_50
GoTo ContinueAPIReDo
End If
End If
If (Line24) Like "*1293*Dealer*not*on*file*Please*try*again*" Or (Line24) Like "*1621*Entry*Required*" Then
APIValidDealer = InputBox("Enter a valid Dealer Number to continue booking", "CIT FBI", , , vbCritical)
APIValidDealer1 = Left(ValidDealer, 6)
APIValidDealer2 = Right(ValidDealer, 4)
If APIValidDealer = vbNullString Then
Exit Sub
ElseIf APIValidDealer <> vbNullString Then
DealerAPI1 = ValidDealer1
DealerAPI2 = ValidDealer2
Call Wait_50
Call Enter_50
GoTo ContinueAPIDealer
End If
End If
'Address Detail
For x = 1 To 5
Call Enter_50
Next x
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line16 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line16 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
For x = 1 To 3
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(InvoiceNo) '118 InvoiceNo
Call Wait_50
Call Enter_50
'Invoice Amount Window
osCurrentScreen.SendKeys "USD"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ListPrice) 'ListPrice
Call Wait_50
For x = 1 To 8
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(PurchaseOrder) '45 PurchaseOrder
Call Wait_50
Call Enter_50
If InvoiceDate <> "" Then
Call osCurrentScreen.SendKeys(InvoiceDateMM) '119 InvoiceDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InvoiceDateDD) '119 InvoiceDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(InvoiceDateYYYY) '119 InvoiceDateYYYY
Call Wait_50
Call Enter_50
End If
If DateDue <> "" Then
Call osCurrentScreen.SendKeys(DateDueMM) '120 DueDateMM
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(DateDueDD) '120 DueDateDD
Call Wait_50
osCurrentScreen.SendKeys "/"
Call Wait_50
Call osCurrentScreen.SendKeys(DateDueYYYY) '120 DueDateYYYY
Call Wait_50
Call Enter_50
End If
If CustName <> "" Then
Call osCurrentScreen.SendKeys(CustName) '4 CustName
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
Else
Call Wait_50
Call Enter_50
End If
Call osCurrentScreen.SendKeys(DeliveryCode) '121 Delivery Code
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(SeparateCheck) '122 Separate Check
Call Wait_50
Call Enter_50
'AP Interface User Defined Fields Maintenance
osCurrentScreen.SendKeys "4"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "TIC "
Call Wait_50
Call osCurrentScreen.SendKeys(CITTicket) ' 99 CITTicket
Call Wait_50
For x = 1 To 12
Call Enter_50
Next x
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "8"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "_"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "5"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "A"
Call Wait_50
Call Enter_50
' Related Parties
If GuarantorCCAN = "Y" Then
osCurrentScreen.SendKeys "+"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorCode) ' 24 GuarantorCode
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorName) ' 25 GuarantorName
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
Call osCurrentScreen.SendKeys(GuarantorAddress1A) ' 26 GuarantorAddress1A
Call Wait_50
osCurrentScreen.SendKeys " "
Call Wait_50
Call osCurrentScreen.SendKeys(GuarantorAddress1B) ' 27 GuarantorAddress1B
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorAddress2) ' 28 GuarantorAddress2
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorAddress3) ' 29 GuarantorAddress3
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorCity) ' 30 GuarantorCity
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorState) ' 31 GuarantorState
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GuarantorCountry) ' 32 GuarantorCountry
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(GurantorZip) ' 33 GurantorZip
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If Line16 Like "*County*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
If Line16 Like "*City codes*" Then
osCurrentScreen.SendKeys "."
Call Wait_50
Call Enter_50
End If
For x = 1 To 18
Call Enter_50
Next x
Else
For x = 1 To 2
Call Enter_50
Next x
End If
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
'Internal Codes
Call osCurrentScreen.SendKeys(ProductLine) '62 ProductLine
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "Y"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "3"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(ProgramType) '63 ProgramType
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "Y"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "4"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(RelationshipA) '64 RelationshipA
Call Wait_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call osCurrentScreen.SendKeys(RelationshipB) '65 RelationshipB
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "6"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(Region) '66 Region
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "Y"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "7"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(Branch) '67 Branch
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "Y"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "10"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(LeadBankA) '68 LeadBankA
Call Wait_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call osCurrentScreen.SendKeys(LeadBankB) '69 LeadBankB
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "Y"
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "17"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(NonNotification) '99 NonNotification
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "28"
Call Wait_50
Call Enter_50
ContinueDealer:
'Dealer Fields
osCurrentScreen.SendKeys "1"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DealerIDA) '70 DealerIDA
Call Wait_50
osCurrentScreen.SendKeys "."
Call Wait_50
Call osCurrentScreen.SendKeys(DealerIDB) '71 DealerIDB
Call Wait_50
Call Enter_50
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Call GrabScreen
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(300)
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
If (Line24) Like "*Enter*valid*code*" Then
'Dim ValidDealer1 As String
'Dim ValidDealer2 As String
ValidDealer = InputBox("Enter a valid Dealer Number to continue booking. Format: XXXXXX.XXXX", "CIT FBI", , , vbCritical)
ValidDealer1 = Left(ValidDealer, 6)
ValidDealer2 = Right(ValidDealer, 4)
If ValidDealer = vbNullString Then
Exit Sub
ElseIf ValidDealer <> vbNullString Then
DealerIDA = ValidDealer1
DealerIDB = ValidDealer2
GoTo ContinueDealer
End If
End If
osCurrentScreen.SendKeys "2"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DealerCode) '72 DealerCode
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "3"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(DPaymentPlan) '73 DPaymentPlan
Call Wait_50
Call Enter_50
osCurrentScreen.SendKeys "4"
Call Wait_50
Call Enter_50
Call osCurrentScreen.SendKeys(PrivateLabel) '74 PrivateLabel
Call Wait_50
For x = 1 To 2
Call Enter_50
Next x
osCurrentScreen.SendKeys "23"
Call Wait_50
Call Enter_50
'Remit To
Call osCurrentScreen.SendKeys(RemitCode) '75 RemitCode
Call Wait_50
For x = 1 To 3
Call Enter_50
Next x
For x = 1 To 2
Call Enter_50
Next x
Close #1 ' Close file.
'Machine Log Report
Dim MyDate
MyDate = Format(Date, "YYYYMMDD")
Dim MyTime
MyTime = Format(Time, "hhmmss")
Dim MyYear
MyYear = Mid(MyDate, 1, 4)
Dim MyMonth
MyMonth = Mid(MyDate, 5, 2)
Dim MyDay
MyDay = Mid(MyDate, 7, 2)
lessor = Format(lessor, String(3, "0"))
ContractVar = Format(ContractVar, String(7, "0"))
ScheduleVar = Format(ScheduleVar, String(3, "0"))
Set fso = CreateObject("Scripting.FileSystemObject")
folderFilePath = "S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & ""
If fso.FolderExists("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "") Then
Dim fs1, f1, ts1
Set fs1 = CreateObject("Scripting.FileSystemObject")
Set f1 = fs1.CreateTextFile("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "\FBI_" & Id & "_" & (lessor) & "-" & (ContractVar) & "-901" & "_" & MyDate & MyTime & ".txt")
f1.Close
Else
Dim fs2, f2, ts2
Set fs2 = CreateObject("Scripting.FileSystemObject")
CheckMyFile:
If fso.FolderExists("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "") Then
Set f2 = fs2.CreateTextFile("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "\FBI_" & Id & "_" & (lessor) & "-" & (ContractVar) & "-901" & "_" & MyDate & MyTime & ".txt")
GoTo EndProcess
ElseIf fso.FolderExists("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "") Then
Set f2 = fs2.CreateFolder("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "")
GoTo CheckMyFile
ElseIf fso.FolderExists("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "") Then
Set f2 = fs2.CreateFolder("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "")
GoTo CheckMyFile
ElseIf fso.FolderExists("S:\Manual_Booking\BOOKING\LOGS\FBI") Then
Set f2 = fs2.CreateFolder("S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "")
GoTo CheckMyFile
ElseIf fso.FolderExists("S:\Manual_Booking\BOOKING\LOGS") Then
Set f2 = fs2.CreateFolder("S:\Manual_Booking\BOOKING\LOGS\FBI")
GoTo CheckMyFile
ElseIf fso.FolderExists("S:\Manual_Booking\BOOKING") Then
Set f2 = fs2.CreateFolder("S:\Manual_Booking\BOOKING\LOGS")
GoTo CheckMyFile
End If
EndProcess:
f2.Close
End If
'Write Log
Open "S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "\FBI_" & Id & "_" & (lessor) & "-" & (ContractVar) & "-901" & "_" & MyDate & MyTime & ".txt" For Append As #2 ' Open file for output.
Print #2, "Financial Booking Interface (FBI)" ' Write comma-delimited data.
Print #2, "Financial Adjustments Revolver Account (RA) Manual Booking" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "Date : " & (MyDate) ' Write comma-delimited data.
Print #2, "Contract : " & (lessor) & "-" & (ContractVar) & "-901" ' Write comma-delimited data.
Print #2, "Booking ID : " & (Id) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "Quality Assurance" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, " Y N " ' Write comma-delimited data.
Print #2, "Are the Customer, Billing, and Asset Addresses correct? [ ] [ ]" ' Write comma-delimited data.
Print #2, "Did the expected Yield populate in infolease? [ ] [ ]" ' Write comma-delimited data.
Print #2, "Was/Were the payable(s) set up correctly in API? [ ] [ ]" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "02 Lessor : " & (lessor) ' Write comma-delimited data.
Print #2, "03 CCAN : " & (CCAN) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* CUSTOMER *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "04 Customer Name : " & (CustName) ' Write comma-delimited data.
Print #2, "05/06 Customer Address 1 : " & (CustAddress1A) & " " & (CustAddress1B) ' Write comma-delimited data.
Print #2, "07 Customer Address 2 : " & (CustAddress2) ' Write comma-delimited data.
Print #2, "08 Customer Address 3 : " & (CustAddress3) ' Write comma-delimited data.
Print #2, "09 Customer City : " & (CustCity) ' Write comma-delimited data.
Print #2, "10 Customer Zip : " & (CustZip) ' Write comma-delimited data.
Print #2, "11 Customer Country Code : " & (CustCountryCode) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* ACCOUNTS RECEIVABLE *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "12 Billing Cust Name : " & (BillingCustName) ' Write comma-delimited data.
Print #2, "13/14 Billing Address 1 : " & (BillingAddress1A) & " " & (BillingAddress1B) ' Write comma-delimited data.
Print #2, "15 Billing Address 2 : " & (BillingAddress2) ' Write comma-delimited data.
Print #2, "16 Billing Address 3 : " & (BillingAddress3) ' Write comma-delimited data.
Print #2, "17 Billing City : " & (BillingCity) ' Write comma-delimited data.
Print #2, "18 Billing Zip : " & (BillingZip) ' Write comma-delimited data.
Print #2, "19 Country Code : " & (CountryCode) ' Write comma-delimited data.
Print #2, "20 Billing Attn : " & (BillingAttn) ' Write comma-delimited data.
Print #2, "21 Contact Name : " & (ContactName) ' Write comma-delimited data.
Print #2, "22 Contact Email : " & (ContactEmail) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* GUARANTOR *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "23 Guarantor CCAN : " & (GuarantorCCAN) ' Write comma-delimited data.
Print #2, "24 Guarantor Code : " & (GuarantorCode) ' Write comma-delimited data.
Print #2, "25 Guarantor Name : " & (GuarantorName) ' Write comma-delimited data.
Print #2, "26/27 Guarantor Address 1 : " & (GuarantorAddress1A) & " " & (GuarantorAddress1B) ' Write comma-delimited data.
Print #2, "28 Guarantor Address 2 : " & (GuarantorAddress2) ' Write comma-delimited data.
Print #2, "29 Guarantor Address 3 : " & (GuarantorAddress3) ' Write comma-delimited data.
Print #2, "30 Guarantor City : " & (GuarantorCity) ' Write comma-delimited data.
Print #2, "31 Guarantor State : " & (GuarantorState) ' Write comma-delimited data.
Print #2, "32 Guarantor Country : " & (GuarantorCountry) ' Write comma-delimited data.
Print #2, "33 Gurantor Zip : " & (GurantorZip) ' Write comma-delimited data.
Print #2, "34 Guarantor FEDID : " & (GuarantorFEDID) ' Write comma-delimited data.
Print #2, "35 Contact Phone : " & (ContactPhone) ' Write comma-delimited data.
Print #2, "36 Customer ID : " & (CustID) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* CONTRACT DATA *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "37 FED ID : " & (FEDID) ' Write comma-delimited data.
Print #2, "38 Purpose Of Loan : " & (PurposeOfLoan) ' Write comma-delimited data.
Print #2, "39 SIC Code : " & (SICCode) ' Write comma-delimited data.
Print #2, "40 Insurance Status : " & (InsStatus) ' Write comma-delimited data.
Print #2, "41 Contract Type : " & (ContractType) ' Write comma-delimited data.
Print #2, "42 Commencement Date : " & (CommencementDateMM) & "/" & (CommencementDateDD) & "/" & (CommencementDateYYYY) ' Write comma-delimited data.
Print #2, "43 MaxCredit Amount : " & (MaxCreditAmount) ' Write comma-delimited data.
Print #2, "44 Maturity Date : " & (MaturityDateMM) & "/" & (MaturityDateDD) & "/" & (MaturityDateYYYY) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* INVOICING DATA *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "45 Purchase Order : " & (PurchaseOrder) ' Write comma-delimited data.
Print #2, "46 Invoice Description : " & (InvoiceDescription) ' Write comma-delimited data.
Print #2, "47 Invoice Code : " & (InvoiceCode) ' Write comma-delimited data.
Print #2, "48 Invoice Format : " & (InvoiceFormat) ' Write comma-delimited data.
Print #2, "49 LeadDays : " & (LeadDays) ' Write comma-delimited data.
Print #2, "50 Invoice Due Day : " & (InvoiceDueDay) ' Write comma-delimited data.
Print #2, "51 First Payment Date : " & (FirstPaymentDate) ' Write comma-delimited data.
Print #2, "101 Billing Code : " & (BillingCycleCode) ' Write comma-delimited data.
Print #2, "Billing Months : " & "J|F|M|A|M|J|J|A|S|O|N|D" ' Write comma-delimited data.
Print #2, "102-113 Flag : " & (BillJan) & "|" & (BillFeb) & "|" & (BillMar) & "|" & (BillApr) & "|" & (BillMay) & "|" & (BillJun) & "|" & (BillJul) & "|" & (BillAug) & "|" & (BillSep) & "|" & (BillOct) & "|" & (BillNov) & "|" & (BillDec) ' Write comma-delimited data.
Print #2, "52 Grace Period : " & (GracePeriod) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* FLOATING RATE DATA *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "53 Principal First : " & (PrincipalFirst) ' Write comma-delimited data.
Print #2, "54 Days In Month : " & (DaysInMonth) ' Write comma-delimited data.
Print #2, "55 Days In Year : " & (DaysInYear) ' Write comma-delimited data.
Print #2, "56 Interest First Payment Date : " & (InterestFirstPaymentDateMM) & "/" & (InterestFirstPaymentDateDD) & "/" & (InterestFirstPaymentDateYYYY) ' Write comma-delimited data.
Print #2, "57 Rate Change Method : " & (RateChangeMethod) ' Write comma-delimited data.
Print #2, "58 Base Rate Code : " & (BaseRateCode) ' Write comma-delimited data.
Print #2, "59 Rate Variance Cd : " & (RateVarianceCd) ' Write comma-delimited data.
Print #2, "60 Rate Variance : " & (RateVariance) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* INTERNAL CODES *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "61 Product Line : " & (ProductLine) ' Write comma-delimited data.
Print #2, "62 Program Type : " & (ProgramType) ' Write comma-delimited data.
Print #2, "63/64 Relationship : " & (RelationshipA) & "." & (RelationshipB) ' Write comma-delimited data.
Print #2, "65 Region : " & (Region) ' Write comma-delimited data.
Print #2, "66 Branch : " & (Branch) ' Write comma-delimited data.
Print #2, "67/68 Lead Bank : " & (LeadBankA) & "." & (LeadBankB) ' Write comma-delimited data.
Print #2, "69/70 Dealer ID : " & (DealerIDA) & "." & (DealerIDB) ' Write comma-delimited data.
Print #2, "71 Dealer Code : " & (DealerCode) ' Write comma-delimited data.
Print #2, "72 DPayment Plan : " & (DPaymentPlan) ' Write comma-delimited data.
Print #2, "73 Private Label : " & (PrivateLabel) ' Write comma-delimited data.
Print #2, "74 Remit Code : " & (RemitCode) ' Write comma-delimited data.
Print #2, "100 NonNotification : " & (NonNotification) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* ASSET INFORMATION *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "75 List Price : " & (ListPrice) ' Write comma-delimited data.
Print #2, "76 Asset Serial Number : " & (AssetSerialNumber) ' Write comma-delimited data.
Print #2, "77 Asset Code : " & (AssetCode) ' Write comma-delimited data.
Print #2, "78 Asset Description : " & (AssetDescription) ' Write comma-delimited data.
Print #2, "79 Date Entered : " & (DateEntered) ' Write comma-delimited data.
Print #2, "80 In Service Date : " & (InServiceDate) ' Write comma-delimited data.
Print #2, "81 Country Asset : " & (CountryAsset) ' Write comma-delimited data.
Print #2, "82 Asset Zip : " & (AssetZip) ' Write comma-delimited data.
Print #2, "83/84 Asset Address 1 : " & (AssetAddress1A) & " " & (AssetAddress1B) ' Write comma-delimited data.
Print #2, "85 Asset Address 2 : " & (AssetAddress2) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* USER DEFINED DATA *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "86 Origination Code : " & (OriginationCode) ' Write comma-delimited data.
Print #2, "87 Booking Code : " & (BookingCode) ' Write comma-delimited data.
Print #2, "88 Vendor App : " & (VendorApp) ' Write comma-delimited data.
Print #2, "89 Application Number : " & (ApplicationNumber) ' Write comma-delimited data.
Print #2, "90 CCEX/VL Code : " & (CCEXVLCode) ' Write comma-delimited data.
Print #2, "91 LGD Indicator : " & (LGDIndicator) ' Write comma-delimited data.
Print #2, "92 PD Indicator : " & (PDIndicator) ' Write comma-delimited data.
Print #2, "93 LGD Score : " & (LGDScore) ' Write comma-delimited data.
Print #2, "94 PD Score : " & (PDScore) ' Write comma-delimited data.
Print #2, "95 LGD Date : " & (LGDDateMM) & "/" & (LGDDateDD) & "/" & (LGDDateYYYY) ' Write comma-delimited data.
Print #2, "96 PD Effective Date : " & (PDEffectiveDateMM) & "/" & (PDEffectiveDateDD) & "/" & (PDEffectiveDateYYYY) ' Write comma-delimited data.
Print #2, "97 Stop Past Due Ltrs : " & (StopPastDueLtrsMM) & "/" & (StopPastDueLtrsDD) & "/" & (StopPastDueLtrsYYYY) ' Write comma-delimited data.
Print #2, "98 Booked By : " & (BookedBy) ' Write comma-delimited data.
Print #2, "99 CIT Ticket : " & (CITTicket) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, "* API INFORMATION *" ' Write comma-delimited data.
Print #2, "*************************************************************************" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "114 Category : " & (Category) ' Write comma-delimited data.
Print #2, "115 PymtType : " & (PymtType) ' Write comma-delimited data.
Print #2, "116 PayCode : " & (PayCode) ' Write comma-delimited data.
Print #2, "117 Dealer : " & (DealerAPI1) & "." & (DealerAPI2) ' Write comma-delimited data.
Print #2, "118 Invoice No : " & (InvoiceNo) ' Write comma-delimited data.
Print #2, "119 Invoice Date : " & (InvoiceDateMM) & " " & (InvoiceDateDD) & " " & (InvoiceDateYYYY) ' Write comma-delimited data.
Print #2, "120 Date Due : " & (DateDueMM) & " " & (DateDueDD) & " " & (DateDueYYYY) ' Write comma-delimited data.
Print #2, "121 API Comments : " & (CustName) ' Write comma-delimited data.
Print #2, "122 Delivery Code : " & (DeliveryCode) ' Write comma-delimited data.
Print #2, "123 Separate Check : " & (SeparateCheck) ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "Signature and Date" ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, " " ' Write comma-delimited data.
Print #2, "___________________________________ " ' Write comma-delimited data.
Close #2
'Open Log
RetVal = Shell("C:\Windows\Notepad.exe S:\Manual_Booking\BOOKING\LOGS\FBI\" & MyYear & "\" & MyMonth & "\" & MyDay & "\FBI_" & Id & "_" & (lessor) & "-" & (ContractVar) & "-901" & "_" & MyDate & MyTime & ".txt", 1) ' Open Log.
End Sub