+ Reply to Thread
Results 1 to 16 of 16

Error with userform

  1. #1
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Error with userform

    I am getting this annoying error.

    I will try to expain.

    I have a form that opens on workbook open event.


    User can't close form by clicking the x, but by hitting log off command button.

    My problem is the sheet opens with the form, then when they click log off, it closes the workbook.

    However,

    The next time the sheet opens microsoft gives an error that says excel is shutting down and trying to recover documents.

    Then I go back in under disable macros and do nothing but open the visual basic editor and close, then close the sheet.

    Then I go back into the sheet and the form loads.

    It seems to load once and then gives me an error the next time I open a workbook.



    Could anybody help me with any ideas?


    Thanks

    Josh

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Josh,

    Can you post the code for the logoff procedure?

    Thanks,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Here is the logoff code

    MsgBox "Saving, please wait"

    Call SaveForm

    MsgBox "Now logging out"


    frmBorrowers.Hide

    ActiveWorkbook.Close savechanges:=True




    Just a couple more points if this helps. I have been testing this all day and am very frustrated.

    I go in and the first time through nothing happens, everything works.

    Then when i go back in and hit log off - after the message box pops up that says saving form, I get the excel error which shuts down and trys to recover my data.

    So I think when it is trying to call SaveData, something is hitting a snag.

    Would this be correct??

  4. #4
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    Can you post your save form code and what is the error that is coming up?
    VBA - The Power Behind the Grid

    Posting a sample of your workbook makes it easier to look at the Issue.

  5. #5
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Code

    I don't get a debug error,

    I get a microsoft office excel dialog box that pops up and states microsoft office excel has encountered a problem and needs to close. we are sorry for the inconvenience. Send error report dont send

    I will post the code in 3 segments


    thanks for any help you can give me.



    Sub SaveForm()


    Application.ScreenUpdating = False


    shBorrowers.Activate
    shBorrowers.Range("A2").Select
    Do
    If ActiveCell.Value <> CInt(txtClientID) Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until ActiveCell.Value = CInt(txtClientID)


    ActiveCell.Offset(0, 1).Value = txtLastName
    ActiveCell.Offset(0, 2).Value = txtFirstName
    ActiveCell.Offset(0, 3).Value = txtHomePhone
    ActiveCell.Offset(0, 4).Value = txtCellPhone
    ActiveCell.Offset(0, 5).Value = txtHomeEmail
    ActiveCell.Offset(0, 6).Value = txtCoBorrowerLastName
    ActiveCell.Offset(0, 7).Value = txtCoBorrowerFirstName
    ActiveCell.Offset(0, 8).Value = txtCoBorrowerHomePhone
    ActiveCell.Offset(0, 9).Value = txtCoBorrowerCellPhone
    ActiveCell.Offset(0, 10).Value = txtCoBorrowerHomeEmail
    ActiveCell.Offset(0, 11).Value = cbxHearAboutUs
    ActiveCell.Offset(0, 12).Value = txtReferredBy
    ActiveCell.Offset(0, 13).Value = cbxReferralType
    ActiveCell.Offset(0, 14).Value = cbxReferralDate
    ActiveCell.Offset(0, 15).Value = txtSalutation
    ActiveCell.Offset(0, 16).Value = cbxLoanType
    ActiveCell.Offset(0, 17).Value = cbxStatus

    ActiveCell.Offset(0, 18).Value = txtProfile_Address1
    ActiveCell.Offset(0, 19).Value = txtProfile_Address2
    ActiveCell.Offset(0, 20).Value = txtProfile_City
    ActiveCell.Offset(0, 21).Value = UCase(txtProfile_State)
    ActiveCell.Offset(0, 22).Value = txtProfile_Zip
    ActiveCell.Offset(0, 23).Value = txtProfile_DOB
    ActiveCell.Offset(0, 24).Value = txtProfile_CoBorrowerAddress1
    ActiveCell.Offset(0, 25).Value = txtProfile_CoBorrowerAddress2
    ActiveCell.Offset(0, 26).Value = txtProfile_CoBorrowerCity
    ActiveCell.Offset(0, 27).Value = UCase(txtProfile_CoBorrowerState)
    ActiveCell.Offset(0, 28).Value = txtProfile_CoBorrowerZip
    ActiveCell.Offset(0, 29).Value = txtProfile_CoBorrowerDOB
    ActiveCell.Offset(0, 30).Value = txtProfile_SpouseName
    ActiveCell.Offset(0, 31).Value = txtProfile_AnniversaryDate
    ActiveCell.Offset(0, 32).Value = txtProfile_SpouseDOB
    ActiveCell.Offset(0, 33).Value = txtProfile_CoBorrowerSpouseName
    ActiveCell.Offset(0, 34).Value = txtProfile_CoBorrowerAnniversaryDate
    ActiveCell.Offset(0, 35).Value = txtProfile_CoBorrowerSpouseDOB
    ActiveCell.Offset(0, 36).Value = txtProfile_Child1Name
    ActiveCell.Offset(0, 37).Value = txtProfile_Child1DOB
    ActiveCell.Offset(0, 38).Value = txtProfile_Child2Name
    ActiveCell.Offset(0, 39).Value = txtProfile_Child2DOB
    ActiveCell.Offset(0, 40).Value = txtProfile_Child3Name
    ActiveCell.Offset(0, 41).Value = txtProfile_Child3DOB
    ActiveCell.Offset(0, 42).Value = txtProfile_Child4Name
    ActiveCell.Offset(0, 43).Value = txtProfile_Child4DOB
    ActiveCell.Offset(0, 44).Value = txtProfile_Child5Name
    ActiveCell.Offset(0, 45).Value = txtProfile_Child5DOB
    ActiveCell.Offset(0, 46).Value = txtProfile_Child6Name
    ActiveCell.Offset(0, 47).Value = txtProfile_Child6DOB
    ActiveCell.Offset(0, 48).Value = txtProfile_CoBorrowerChild1Name
    ActiveCell.Offset(0, 49).Value = txtProfile_CoBorrowerChild1DOB
    ActiveCell.Offset(0, 50).Value = txtProfile_CoBorrowerChild2Name
    ActiveCell.Offset(0, 51).Value = txtProfile_CoBorrowerChild2DOB
    ActiveCell.Offset(0, 52).Value = txtProfile_CoBorrowerChild3Name
    ActiveCell.Offset(0, 53).Value = txtProfile_CoBorrowerChild3DOB
    ActiveCell.Offset(0, 54).Value = txtProfile_CoBorrowerChild4Name
    ActiveCell.Offset(0, 55).Value = txtProfile_CoBorrowerChild4DOB
    ActiveCell.Offset(0, 56).Value = txtProfile_CoBorrowerChild5Name
    ActiveCell.Offset(0, 57).Value = txtProfile_CoBorrowerChild5DOB
    ActiveCell.Offset(0, 58).Value = txtProfile_CoBorrowerChild6Name
    ActiveCell.Offset(0, 59).Value = txtProfile_CoBorrowerChild6DOB
    ActiveCell.Offset(0, 60).Value = txtProfile_Hobby1
    ActiveCell.Offset(0, 61).Value = txtProfile_Hobby2
    ActiveCell.Offset(0, 62).Value = txtProfile_Hobby3
    ActiveCell.Offset(0, 63).Value = txtProfile_Hobby4
    ActiveCell.Offset(0, 64).Value = txtProfile_Hobby5
    ActiveCell.Offset(0, 65).Value = txtProfile_CoBorrowerHobby1
    ActiveCell.Offset(0, 66).Value = txtProfile_CoBorrowerHobby2
    ActiveCell.Offset(0, 67).Value = txtProfile_CoBorrowerHobby3
    ActiveCell.Offset(0, 68).Value = txtProfile_CoBorrowerHobby4
    ActiveCell.Offset(0, 69).Value = txtProfile_CoBorrowerHobby5

    ActiveCell.Offset(0, 70).Value = txtIncome_AnnualIncome
    ActiveCell.Offset(0, 71).Value = cbxIncome_IncomeType
    ActiveCell.Offset(0, 72).Value = txtIncome_SSN
    ActiveCell.Offset(0, 73).Value = txtIncome_CreditScore
    ActiveCell.Offset(0, 74).Value = txtIncome_AlimonyChildSupport
    ActiveCell.Offset(0, 75).Value = txtIncome_Notes
    ActiveCell.Offset(0, 76).Value = txtIncome_CoBorrowerAnnualIncome
    ActiveCell.Offset(0, 77).Value = cbxIncome_CoBorrowerIncomeType
    ActiveCell.Offset(0, 78).Value = txtIncome_CoBorrowerSSN
    ActiveCell.Offset(0, 79).Value = txtIncome_CoBorrowerCreditScore
    ActiveCell.Offset(0, 80).Value = txtIncome_CoBorrowerAlimonyChildSupport
    ActiveCell.Offset(0, 81).Value = txtIncome_AutoPayments
    ActiveCell.Offset(0, 82).Value = txtIncome_RevolvingBalance
    ActiveCell.Offset(0, 83).Value = txtIncome_RevolvingPayments
    ActiveCell.Offset(0, 84).Value = txtIncome_InstallmentPayment
    ActiveCell.Offset(0, 85).Value = txtIncome_Rent
    ActiveCell.Offset(0, 86).Value = txtIncome_TotalAssets
    ActiveCell.Offset(0, 87).Value = cbxIncome_EmploymentStatus
    ActiveCell.Offset(0, 88).Value = cbxIncome_TypeOfWork
    ActiveCell.Offset(0, 89).Value = txtIncome_Company
    ActiveCell.Offset(0, 90).Value = txtIncome_Title
    ActiveCell.Offset(0, 91).Value = txtIncome_YearsAtJob
    ActiveCell.Offset(0, 92).Value = cbxIncome_CoBorrowerEmploymentStatus
    ActiveCell.Offset(0, 93).Value = cbxIncome_CoBorrowerIncomeType
    ActiveCell.Offset(0, 94).Value = txtIncome_CoBorrowerCompany
    ActiveCell.Offset(0, 95).Value = txtIncome_CoBorrowerTitle
    ActiveCell.Offset(0, 96).Value = txtIncome_CoBorrowerYearsAtJob
    ActiveCell.Offset(0, 97).Value = txtIncome_Address1
    ActiveCell.Offset(0, 98).Value = txtIncome_Address2
    ActiveCell.Offset(0, 99).Value = txtIncome_City
    ActiveCell.Offset(0, 100).Value = UCase(txtIncome_State)
    ActiveCell.Offset(0, 101).Value = txtIncome_Zip
    ActiveCell.Offset(0, 102).Value = txtIncome_Phone
    ActiveCell.Offset(0, 103).Value = txtIncome_Fax
    ActiveCell.Offset(0, 104).Value = txtIncome_Email
    ActiveCell.Offset(0, 105).Value = txtIncome_CoBorrowerAddress1
    ActiveCell.Offset(0, 106).Value = txtIncome_CoBorrowerAddress2
    ActiveCell.Offset(0, 107).Value = txtIncome_CoBorrowerCity
    ActiveCell.Offset(0, 108).Value = UCase(txtIncome_CoBorrowerState)
    ActiveCell.Offset(0, 109).Value = txtIncome_CoBorrowerZip
    ActiveCell.Offset(0, 110).Value = txtIncome_CoBorrowerPhone
    ActiveCell.Offset(0, 111).Value = txtIncome_CoBorrowerFax
    ActiveCell.Offset(0, 112).Value = txtIncome_CoBorrowerEmail

  6. #6
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    more code

    shBorrowers_AltContacts.Activate
    shBorrowers_AltContacts.Range("A2").Select
    Do
    If ActiveCell.Value <> CInt(txtClientID) Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until ActiveCell.Value = CInt(txtClientID)

    ActiveCell.Offset(0, 1).Value = txtAltContacts_AppraiserCompany
    ActiveCell.Offset(0, 2).Value = txtAltContacts_AppraiserContact
    ActiveCell.Offset(0, 3).Value = txtAltContacts_AppraiserAddress
    ActiveCell.Offset(0, 4).Value = txtAltContacts_AppraiserCity
    ActiveCell.Offset(0, 5).Value = txtAltContacts_AppraiserState
    ActiveCell.Offset(0, 6).Value = txtAltContacts_AppraiserZip
    ActiveCell.Offset(0, 7).Value = txtAltContacts_AppraiserPhone
    ActiveCell.Offset(0, 8).Value = txtAltContacts_AppraiserFax
    ActiveCell.Offset(0, 9).Value = txtAltContacts_AppraiserEmail

    ActiveCell.Offset(0, 10).Value = txtAltContacts_TitleCompany
    ActiveCell.Offset(0, 11).Value = txtAltContacts_TitleCompanyContact
    ActiveCell.Offset(0, 12).Value = txtAltContacts_TitleCompanyAddress
    ActiveCell.Offset(0, 13).Value = txtAltContacts_TitleCompanyCity
    ActiveCell.Offset(0, 14).Value = txtAltContacts_TitleCompanyState
    ActiveCell.Offset(0, 15).Value = txtAltContacts_TitleCompanyZip
    ActiveCell.Offset(0, 16).Value = txtAltContacts_TitleCompanyPhone
    ActiveCell.Offset(0, 17).Value = txtAltContacts_TitleCompanyFax
    ActiveCell.Offset(0, 18).Value = txtAltContacts_TitleCompanyEmail

    ActiveCell.Offset(0, 19).Value = txtAltContacts_EscrowOfficerCompany
    ActiveCell.Offset(0, 20).Value = txtAltContacts_EscrowOfficerName
    ActiveCell.Offset(0, 21).Value = txtAltContacts_EscrowOfficerAddress
    ActiveCell.Offset(0, 22).Value = txtAltContacts_EscrowOfficerCity
    ActiveCell.Offset(0, 23).Value = txtAltContacts_EscrowOfficerState
    ActiveCell.Offset(0, 24).Value = txtAltContacts_EscrowOfficerZip
    ActiveCell.Offset(0, 25).Value = txtAltContacts_EscrowOfficerPhone
    ActiveCell.Offset(0, 26).Value = txtAltContacts_EscrowOfficerFax
    ActiveCell.Offset(0, 27).Value = txtAltContacts_EscrowOfficerEmail

    ActiveCell.Offset(0, 28).Value = txtAltContacts_BuyingAgentCompany
    ActiveCell.Offset(0, 29).Value = txtAltContacts_BuyingAgentName
    ActiveCell.Offset(0, 30).Value = txtAltContacts_BuyingAgentAddress
    ActiveCell.Offset(0, 31).Value = txtAltContacts_BuyingAgentCity
    ActiveCell.Offset(0, 32).Value = txtAltContacts_BuyingAgentState
    ActiveCell.Offset(0, 33).Value = txtAltContacts_BuyingAgentZip
    ActiveCell.Offset(0, 34).Value = txtAltContacts_BuyingAgentPhone
    ActiveCell.Offset(0, 35).Value = txtAltContacts_BuyingAgentFax
    ActiveCell.Offset(0, 36).Value = txtAltContacts_BuyingAgentEmail

    ActiveCell.Offset(0, 37).Value = txtAltContacts_ListingAgentCompany
    ActiveCell.Offset(0, 38).Value = txtAltContacts_ListingAgentName
    ActiveCell.Offset(0, 39).Value = txtAltContacts_ListingAgentAddress
    ActiveCell.Offset(0, 40).Value = txtAltContacts_ListingAgentCity
    ActiveCell.Offset(0, 41).Value = txtAltContacts_ListingAgentState
    ActiveCell.Offset(0, 42).Value = txtAltContacts_ListingAgentZip
    ActiveCell.Offset(0, 43).Value = txtAltContacts_ListingAgentPhone
    ActiveCell.Offset(0, 44).Value = txtAltContacts_ListingAgentFax
    ActiveCell.Offset(0, 45).Value = txtAltContacts_ListingAgentEmail

    ActiveCell.Offset(0, 46).Value = txtAltContacts_CPACompany
    ActiveCell.Offset(0, 47).Value = txtAltContacts_CPAName
    ActiveCell.Offset(0, 48).Value = txtAltContacts_CPAAddress
    ActiveCell.Offset(0, 49).Value = txtAltContacts_CPACity
    ActiveCell.Offset(0, 50).Value = txtAltContacts_CPAState
    ActiveCell.Offset(0, 51).Value = txtAltContacts_CPAZip
    ActiveCell.Offset(0, 52).Value = txtAltContacts_CPAPhone
    ActiveCell.Offset(0, 53).Value = txtAltContacts_CPAFax
    ActiveCell.Offset(0, 54).Value = txtAltContacts_CPAEmail

    ActiveCell.Offset(0, 55).Value = txtAltContacts_FinancialPlannerCompany
    ActiveCell.Offset(0, 56).Value = txtAltContacts_FinancialPlannerName
    ActiveCell.Offset(0, 57).Value = txtAltContacts_FinancialPlannerAddress
    ActiveCell.Offset(0, 58).Value = txtAltContacts_FinancialPlannerCity
    ActiveCell.Offset(0, 59).Value = txtAltContacts_FinancialPlannerState
    ActiveCell.Offset(0, 60).Value = txtAltContacts_FinancialPlannerZip
    ActiveCell.Offset(0, 61).Value = txtAltContacts_FinancialPlannerPhone
    ActiveCell.Offset(0, 62).Value = txtAltContacts_FinancialPlannerFax
    ActiveCell.Offset(0, 63).Value = txtAltContacts_FinancialPlannerEmail


    shBorrowers_LoanInfo.Activate
    shBorrowers_LoanInfo.Range("A2").Select
    Do
    If ActiveCell.Value <> CInt(txtClientID) Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until ActiveCell.Value = CInt(txtClientID)

    ActiveCell.Offset(0, 1).Value = txtLoanInfo_NewLoan_Date
    ActiveCell.Offset(0, 2).Value = txtLoanInfo_NewLoan_Amount
    ActiveCell.Offset(0, 3).Value = cbxLoanInfo_NewLoan_LoanType
    ActiveCell.Offset(0, 4).Value = txtLoanInfo_NewLoan_Rate
    ActiveCell.Offset(0, 5).Value = txtLoanInfo_NewLoan_Payment
    ActiveCell.Offset(0, 6).Value = txtLoanInfo_NewLoan_Amount2
    ActiveCell.Offset(0, 7).Value = cbxLoanInfo_NewLoan_LoanType2
    ActiveCell.Offset(0, 8).Value = txtLoanInfo_NewLoan_Rate2
    ActiveCell.Offset(0, 9).Value = txtLoanInfo_NewLoan_Payment2
    ActiveCell.Offset(0, 10).Value = txtLoanInfo_NewLoan_CurrentValue
    ActiveCell.Offset(0, 11).Value = txtLoanInfo_NewLoan_ProposedLender
    ActiveCell.Offset(0, 12).Value = txtLoanInfo_NewLoan_DownPayment
    ActiveCell.Offset(0, 13).Value = txtLoanInfo_NewLoan_LoanNotes

    ActiveCell.Offset(0, 14).Value = txtLoanInfo_1TrustDeed_LoanAmount
    ActiveCell.Offset(0, 15).Value = txtLoanInfo_1TrustDeed_Rate
    ActiveCell.Offset(0, 16).Value = txtLoanInfo_1TrustDeed_PaymentAmount
    ActiveCell.Offset(0, 17).Value = cbxLoanInfo_1TrustDeed_Program
    ActiveCell.Offset(0, 18).Value = txtLoanInfo_1TrustDeed_AppraisedValue
    ActiveCell.Offset(0, 19).Value = txtLoanInfo_1TrustDeed_PurchasePrice
    ActiveCell.Offset(0, 20).Value = txtLoanInfo_1TrustDeed_Lender
    ActiveCell.Offset(0, 21).Value = txtLoanInfo_1TrustDeed_Escrow
    ActiveCell.Offset(0, 22).Value = txtLoanInfo_1TrustDeed_Margin
    ActiveCell.Offset(0, 23).Value = txtLoanInfo_1TrustDeed_Index
    ActiveCell.Offset(0, 24).Value = txtLoanInfo_1TrustDeed_LifeCap
    ActiveCell.Offset(0, 25).Value = cbxLoanInfo_1TrustDeed_PrePayDate
    ActiveCell.Offset(0, 26).Value = txtLoanInfo_1TrustDeed_PMI
    ActiveCell.Offset(0, 27).Value = cbxLoanInfo_1TrustDeed_DocumentationType

  7. #7
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    more code

    ActiveCell.Offset(0, 28).Value = txtLoanInfo_2TrustDeed_LoanAmount
    ActiveCell.Offset(0, 29).Value = txtLoanInfo_2TrustDeed_Rate
    ActiveCell.Offset(0, 30).Value = txtLoanInfo_2TrustDeed_PaymentAmount
    ActiveCell.Offset(0, 31).Value = cbxLoanInfo_2TrustDeed_Program
    ActiveCell.Offset(0, 32).Value = txtLoanInfo_2TrustDeed_AppraisedValue
    ActiveCell.Offset(0, 33).Value = txtLoanInfo_2TrustDeed_PurchasePrice
    ActiveCell.Offset(0, 34).Value = txtLoanInfo_2TrustDeed_Lender
    ActiveCell.Offset(0, 35).Value = txtLoanInfo_2TrustDeed_Escrow
    ActiveCell.Offset(0, 36).Value = txtLoanInfo_2TrustDeed_Margin
    ActiveCell.Offset(0, 37).Value = txtLoanInfo_2TrustDeed_Index
    ActiveCell.Offset(0, 38).Value = txtLoanInfo_2TrustDeed_LifeCap
    ActiveCell.Offset(0, 39).Value = cbxLoanInfo_2TrustDeed_PrePayDate
    ActiveCell.Offset(0, 40).Value = txtLoanInfo_2TrustDeed_PMI
    ActiveCell.Offset(0, 41).Value = cbxLoanInfo_2TrustDeed_DocumentationType

    ActiveCell.Offset(0, 42).Value = txtLoanInfo_OtherProperty1_Address
    ActiveCell.Offset(0, 43).Value = txtLoanInfo_OtherProperty1_City
    ActiveCell.Offset(0, 44).Value = txtLoanInfo_OtherProperty1_State
    ActiveCell.Offset(0, 45).Value = txtLoanInfo_OtherProperty1_Zip
    ActiveCell.Offset(0, 46).Value = txtLoanInfo_OtherProperty1_LoanAmount
    ActiveCell.Offset(0, 47).Value = txtLoanInfo_OtherProperty1_Rate
    ActiveCell.Offset(0, 48).Value = txtLoanInfo_OtherProperty1_PaymentAmount
    ActiveCell.Offset(0, 49).Value = cbxLoanInfo_OtherProperty1_Program
    ActiveCell.Offset(0, 50).Value = txtLoanInfo_OtherProperty1_AppraisedValue
    ActiveCell.Offset(0, 51).Value = txtLoanInfo_OtherProperty1_PurchasePrice
    ActiveCell.Offset(0, 52).Value = txtLoanInfo_OtherProperty1_Lender
    ActiveCell.Offset(0, 53).Value = txtLoanInfo_OtherProperty1_Escrow
    ActiveCell.Offset(0, 54).Value = txtLoanInfo_OtherProperty1_Margin
    ActiveCell.Offset(0, 55).Value = txtLoanInfo_OtherProperty1_Index
    ActiveCell.Offset(0, 56).Value = txtLoanInfo_OtherProperty1_LifeCap
    ActiveCell.Offset(0, 57).Value = cbxLoanInfo_OtherProperty1_PrePayDate
    ActiveCell.Offset(0, 58).Value = txtLoanInfo_OtherProperty1_PMI
    ActiveCell.Offset(0, 59).Value = cbxLoanInfo_OtherProperty1_DocumentationType

    ActiveCell.Offset(0, 60).Value = txtLoanInfo_OtherProperty2_Address
    ActiveCell.Offset(0, 61).Value = txtLoanInfo_OtherProperty2_City
    ActiveCell.Offset(0, 62).Value = txtLoanInfo_OtherProperty2_State
    ActiveCell.Offset(0, 63).Value = txtLoanInfo_OtherProperty2_Zip
    ActiveCell.Offset(0, 64).Value = txtLoanInfo_OtherProperty2_LoanAmount
    ActiveCell.Offset(0, 65).Value = txtLoanInfo_OtherProperty2_Rate
    ActiveCell.Offset(0, 66).Value = txtLoanInfo_OtherProperty2_PaymentAmount
    ActiveCell.Offset(0, 67).Value = cbxLoanInfo_OtherProperty2_Program
    ActiveCell.Offset(0, 68).Value = txtLoanInfo_OtherProperty2_AppraisedValue
    ActiveCell.Offset(0, 69).Value = txtLoanInfo_OtherProperty2_PurchasePrice
    ActiveCell.Offset(0, 70).Value = txtLoanInfo_OtherProperty2_Lender
    ActiveCell.Offset(0, 71).Value = txtLoanInfo_OtherProperty2_Escrow
    ActiveCell.Offset(0, 72).Value = txtLoanInfo_OtherProperty2_Margin
    ActiveCell.Offset(0, 73).Value = txtLoanInfo_OtherProperty2_Index
    ActiveCell.Offset(0, 74).Value = txtLoanInfo_OtherProperty2_LifeCap
    ActiveCell.Offset(0, 75).Value = cbxLoanInfo_OtherProperty2_PrePayDate
    ActiveCell.Offset(0, 76).Value = txtLoanInfo_OtherProperty2_PMI
    ActiveCell.Offset(0, 77).Value = cbxLoanInfo_OtherProperty2_DocumentationType

    ActiveCell.Offset(0, 78).Value = txtLoanInfo_OtherProperty3_Address
    ActiveCell.Offset(0, 79).Value = txtLoanInfo_OtherProperty3_City
    ActiveCell.Offset(0, 80).Value = txtLoanInfo_OtherProperty3_State
    ActiveCell.Offset(0, 81).Value = txtLoanInfo_OtherProperty3_Zip
    ActiveCell.Offset(0, 82).Value = txtLoanInfo_OtherProperty3_LoanAmount
    ActiveCell.Offset(0, 83).Value = txtLoanInfo_OtherProperty3_Rate
    ActiveCell.Offset(0, 84).Value = txtLoanInfo_OtherProperty3_PaymentAmount
    ActiveCell.Offset(0, 85).Value = cbxLoanInfo_OtherProperty3_Program
    ActiveCell.Offset(0, 86).Value = txtLoanInfo_OtherProperty3_AppraisedValue
    ActiveCell.Offset(0, 87).Value = txtLoanInfo_OtherProperty3_PurchasePrice
    ActiveCell.Offset(0, 88).Value = txtLoanInfo_OtherProperty3_Lender
    ActiveCell.Offset(0, 89).Value = txtLoanInfo_OtherProperty3_Escrow
    ActiveCell.Offset(0, 90).Value = txtLoanInfo_OtherProperty3_Margin
    ActiveCell.Offset(0, 91).Value = txtLoanInfo_OtherProperty3_Index
    ActiveCell.Offset(0, 92).Value = txtLoanInfo_OtherProperty3_LifeCap
    ActiveCell.Offset(0, 93).Value = cbxLoanInfo_OtherProperty3_PrePayDate
    ActiveCell.Offset(0, 94).Value = txtLoanInfo_OtherProperty3_PMI
    ActiveCell.Offset(0, 95).Value = cbxLoanInfo_OtherProperty3_DocumentationType

    ActiveCell.Offset(0, 96).Value = txtLoanInfo_OtherProperty4_Address
    ActiveCell.Offset(0, 97).Value = txtLoanInfo_OtherProperty4_City
    ActiveCell.Offset(0, 98).Value = txtLoanInfo_OtherProperty4_State
    ActiveCell.Offset(0, 99).Value = txtLoanInfo_OtherProperty4_Zip
    ActiveCell.Offset(0, 100).Value = txtLoanInfo_OtherProperty4_LoanAmount
    ActiveCell.Offset(0, 101).Value = txtLoanInfo_OtherProperty4_Rate
    ActiveCell.Offset(0, 102).Value = txtLoanInfo_OtherProperty4_PaymentAmount
    ActiveCell.Offset(0, 103).Value = cbxLoanInfo_OtherProperty4_Program
    ActiveCell.Offset(0, 104).Value = txtLoanInfo_OtherProperty4_AppraisedValue
    ActiveCell.Offset(0, 105).Value = txtLoanInfo_OtherProperty4_PurchasePrice
    ActiveCell.Offset(0, 106).Value = txtLoanInfo_OtherProperty4_Lender
    ActiveCell.Offset(0, 107).Value = txtLoanInfo_OtherProperty4_Escrow
    ActiveCell.Offset(0, 108).Value = txtLoanInfo_OtherProperty4_Margin
    ActiveCell.Offset(0, 109).Value = txtLoanInfo_OtherProperty4_Index
    ActiveCell.Offset(0, 110).Value = txtLoanInfo_OtherProperty4_LifeCap
    ActiveCell.Offset(0, 111).Value = cbxLoanInfo_OtherProperty4_PrePayDate
    ActiveCell.Offset(0, 112).Value = txtLoanInfo_OtherProperty4_PMI
    ActiveCell.Offset(0, 113).Value = cbxLoanInfo_OtherProperty4_DocumentationType

    ActiveCell.Offset(0, 114).Value = txtLoanInfo_OtherProperty5_Address
    ActiveCell.Offset(0, 115).Value = txtLoanInfo_OtherProperty5_City
    ActiveCell.Offset(0, 116).Value = txtLoanInfo_OtherProperty5_State
    ActiveCell.Offset(0, 117).Value = txtLoanInfo_OtherProperty5_Zip
    ActiveCell.Offset(0, 118).Value = txtLoanInfo_OtherProperty5_LoanAmount
    ActiveCell.Offset(0, 119).Value = txtLoanInfo_OtherProperty5_Rate
    ActiveCell.Offset(0, 120).Value = txtLoanInfo_OtherProperty5_PaymentAmount
    ActiveCell.Offset(0, 121).Value = cbxLoanInfo_OtherProperty5_Program
    ActiveCell.Offset(0, 122).Value = txtLoanInfo_OtherProperty5_AppraisedValue
    ActiveCell.Offset(0, 123).Value = txtLoanInfo_OtherProperty5_PurchasePrice
    ActiveCell.Offset(0, 124).Value = txtLoanInfo_OtherProperty5_Lender
    ActiveCell.Offset(0, 125).Value = txtLoanInfo_OtherProperty5_Escrow
    ActiveCell.Offset(0, 126).Value = txtLoanInfo_OtherProperty5_Margin
    ActiveCell.Offset(0, 127).Value = txtLoanInfo_OtherProperty5_Index
    ActiveCell.Offset(0, 128).Value = txtLoanInfo_OtherProperty5_LifeCap
    ActiveCell.Offset(0, 129).Value = cbxLoanInfo_OtherProperty5_PrePayDate
    ActiveCell.Offset(0, 130).Value = txtLoanInfo_OtherProperty5_PMI
    ActiveCell.Offset(0, 131).Value = cbxLoanInfo_OtherProperty5_DocumentationType

  8. #8
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    final code

    shBorrowers_FinancialPlan.Activate
    shBorrowers_FinancialPlan.Range("A2").Select
    Do
    If ActiveCell.Value <> CInt(txtClientID) Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until ActiveCell.Value = CInt(txtClientID)

    ActiveCell.Offset(0, 1).Value = txtFinancialPlan_HouseholdIncomeAmount
    ActiveCell.Offset(0, 2).Value = cbxFinancialPlan_HouseholdIncome
    ActiveCell.Offset(0, 3).Value = cbxFinancialPlan_FutureObligation1
    ActiveCell.Offset(0, 4).Value = cbxFinancialPlan_FutureObligation2
    ActiveCell.Offset(0, 5).Value = cbxFinancialPlan_FutureObligation3
    ActiveCell.Offset(0, 6).Value = cbxFinancialPlan_FutureObligation4
    ActiveCell.Offset(0, 7).Value = cbxFinancialPlan_FinancialPhilosophy
    ActiveCell.Offset(0, 8).Value = cbxFinancialPlan_RateCPA
    ActiveCell.Offset(0, 9).Value = txtFinancialPlan_CPAComment
    ActiveCell.Offset(0, 10).Value = cbxFinancialPlan_RateFinancialPlanner
    ActiveCell.Offset(0, 11).Value = txtFinancialPlan_FinancialPlannerComment
    ActiveCell.Offset(0, 12).Value = cbxFinancialPlan_RateLivingTrust
    ActiveCell.Offset(0, 13).Value = txtFinancialPlan_LivingTrustComment
    ActiveCell.Offset(0, 14).Value = cbxFinancialPlan_RateLifeInsurance
    ActiveCell.Offset(0, 15).Value = txtFinancialPlan_LifeInsuranceComment
    ActiveCell.Offset(0, 16).Value = cbxFinancialPlan_RateAutoInsurance
    ActiveCell.Offset(0, 17).Value = txtFinancialPlan_AutoInsuranceComment
    ActiveCell.Offset(0, 18).Value = cbxFinancialPlan_RateHomeownersInsurance
    ActiveCell.Offset(0, 19).Value = txtFinancialPlan_HomeownersInsuranceComment
    ActiveCell.Offset(0, 20).Value = cbxFinancialPlan_RetirementPlan
    ActiveCell.Offset(0, 21).Value = txtFinancialPlan_RetirementAge
    ActiveCell.Offset(0, 22).Value = txtFinancialPlan_RetirementComments
    ActiveCell.Offset(0, 23).Value = cbxFinancialPlan_CollegeFund
    ActiveCell.Offset(0, 24).Value = txtFinancialPlan_CollegeFundComments


    shBorrowers.Activate
    shBorrowers.Range("A2:HZ1000").Select
    Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
    Ordercustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    Dataoption1:=xlSortNormal

    shBorrowers.Range("A2").Select

    shHome.Activate



    Application.ScreenUpdating = True




    End Sub

  9. #9
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    I may have found the area, but don't know why it isn't working

    I put a few msgboxes in the code to try to find where the error is coming from and I think I found the general area.

    If someone could please take a look

    the last msgbox that pops up is "found client id" so the error has to be happening immediately below the msgbox "found client id" i would assume

    I just thought of this but many of the txt boxes in the form are empty or have no data in them. I don't know if that is throwing this awry!



    Sub SaveForm()

    MsgBox "in save form"


    Application.ScreenUpdating = False


    shBorrowers.Activate
    shBorrowers.Range("A2").Select
    Do
    If ActiveCell.Value <> CInt(txtClientID) Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until ActiveCell.Value = CInt(txtClientID)

    MsgBox "found client id"

    ActiveCell.Offset(0, 1).Value = txtLastName
    ActiveCell.Offset(0, 2).Value = txtFirstName
    ActiveCell.Offset(0, 3).Value = txtHomePhone
    ActiveCell.Offset(0, 4).Value = txtCellPhone
    ActiveCell.Offset(0, 5).Value = txtHomeEmail
    ActiveCell.Offset(0, 6).Value = txtCoBorrowerLastName
    ActiveCell.Offset(0, 7).Value = txtCoBorrowerFirstName
    ActiveCell.Offset(0, 8).Value = txtCoBorrowerHomePhone
    ActiveCell.Offset(0, 9).Value = txtCoBorrowerCellPhone
    ActiveCell.Offset(0, 10).Value = txtCoBorrowerHomeEmail
    ActiveCell.Offset(0, 11).Value = cbxHearAboutUs
    ActiveCell.Offset(0, 12).Value = txtReferredBy
    ActiveCell.Offset(0, 13).Value = cbxReferralType
    ActiveCell.Offset(0, 14).Value = cbxReferralDate
    ActiveCell.Offset(0, 15).Value = txtSalutation
    ActiveCell.Offset(0, 16).Value = cbxLoanType
    ActiveCell.Offset(0, 17).Value = cbxStatus

    MsgBox "through status"

    ActiveCell.Offset(0, 18).Value = txtProfile_Address1
    ActiveCell.Offset(0, 19).Value = txtProfile_Address2
    ActiveCell.Offset(0, 20).Value = txtProfile_City
    'ActiveCell.Offset(0, 21).Value = UCase(txtProfile_State)
    ActiveCell.Offset(0, 22).Value = txtProfile_Zip
    ActiveCell.Offset(0, 23).Value = txtProfile_DOB
    ActiveCell.Offset(0, 24).Value = txtProfile_CoBorrowerAddress1
    ActiveCell.Offset(0, 25).Value = txtProfile_CoBorrowerAddress2
    ActiveCell.Offset(0, 26).Value = txtProfile_CoBorrowerCity
    'ActiveCell.Offset(0, 27).Value = UCase(txtProfile_CoBorrowerState)
    ActiveCell.Offset(0, 28).Value = txtProfile_CoBorrowerZip
    ActiveCell.Offset(0, 29).Value = txtProfile_CoBorrowerDOB
    ActiveCell.Offset(0, 30).Value = txtProfile_SpouseName
    ActiveCell.Offset(0, 31).Value = txtProfile_AnniversaryDate
    ActiveCell.Offset(0, 32).Value = txtProfile_SpouseDOB
    ActiveCell.Offset(0, 33).Value = txtProfile_CoBorrowerSpouseName
    ActiveCell.Offset(0, 34).Value = txtProfile_CoBorrowerAnniversaryDate
    ActiveCell.Offset(0, 35).Value = txtProfile_CoBorrowerSpouseDOB
    ActiveCell.Offset(0, 36).Value = txtProfile_Child1Name
    ActiveCell.Offset(0, 37).Value = txtProfile_Child1DOB
    ActiveCell.Offset(0, 38).Value = txtProfile_Child2Name
    ActiveCell.Offset(0, 39).Value = txtProfile_Child2DOB
    ActiveCell.Offset(0, 40).Value = txtProfile_Child3Name
    ActiveCell.Offset(0, 41).Value = txtProfile_Child3DOB
    ActiveCell.Offset(0, 42).Value = txtProfile_Child4Name
    ActiveCell.Offset(0, 43).Value = txtProfile_Child4DOB
    ActiveCell.Offset(0, 44).Value = txtProfile_Child5Name
    ActiveCell.Offset(0, 45).Value = txtProfile_Child5DOB
    ActiveCell.Offset(0, 46).Value = txtProfile_Child6Name
    ActiveCell.Offset(0, 47).Value = txtProfile_Child6DOB
    ActiveCell.Offset(0, 48).Value = txtProfile_CoBorrowerChild1Name
    ActiveCell.Offset(0, 49).Value = txtProfile_CoBorrowerChild1DOB
    ActiveCell.Offset(0, 50).Value = txtProfile_CoBorrowerChild2Name
    ActiveCell.Offset(0, 51).Value = txtProfile_CoBorrowerChild2DOB
    ActiveCell.Offset(0, 52).Value = txtProfile_CoBorrowerChild3Name
    ActiveCell.Offset(0, 53).Value = txtProfile_CoBorrowerChild3DOB
    ActiveCell.Offset(0, 54).Value = txtProfile_CoBorrowerChild4Name
    ActiveCell.Offset(0, 55).Value = txtProfile_CoBorrowerChild4DOB
    ActiveCell.Offset(0, 56).Value = txtProfile_CoBorrowerChild5Name
    ActiveCell.Offset(0, 57).Value = txtProfile_CoBorrowerChild5DOB
    ActiveCell.Offset(0, 58).Value = txtProfile_CoBorrowerChild6Name
    ActiveCell.Offset(0, 59).Value = txtProfile_CoBorrowerChild6DOB
    ActiveCell.Offset(0, 60).Value = txtProfile_Hobby1
    ActiveCell.Offset(0, 61).Value = txtProfile_Hobby2
    ActiveCell.Offset(0, 62).Value = txtProfile_Hobby3
    ActiveCell.Offset(0, 63).Value = txtProfile_Hobby4
    ActiveCell.Offset(0, 64).Value = txtProfile_Hobby5
    ActiveCell.Offset(0, 65).Value = txtProfile_CoBorrowerHobby1
    ActiveCell.Offset(0, 66).Value = txtProfile_CoBorrowerHobby2
    ActiveCell.Offset(0, 67).Value = txtProfile_CoBorrowerHobby3
    ActiveCell.Offset(0, 68).Value = txtProfile_CoBorrowerHobby4
    ActiveCell.Offset(0, 69).Value = txtProfile_CoBorrowerHobby5

    MsgBox "through profile"
    ActiveCell.Offset(0, 70).Value = txtIncome_AnnualIncome
    ActiveCell.Offset(0, 71).Value = cbxIncome_IncomeType
    ActiveCell.Offset(0, 72).Value = txtIncome_SSN
    ActiveCell.Offset(0, 73).Value = txtIncome_CreditScore
    ActiveCell.Offset(0, 74).Value = txtIncome_AlimonyChildSupport
    ActiveCell.Offset(0, 75).Value = txtIncome_Notes
    ActiveCell.Offset(0, 76).Value = txtIncome_CoBorrowerAnnualIncome
    ActiveCell.Offset(0, 77).Value = cbxIncome_CoBorrowerIncomeType
    ActiveCell.Offset(0, 78).Value = txtIncome_CoBorrowerSSN
    ActiveCell.Offset(0, 79).Value = txtIncome_CoBorrowerCreditScore
    ActiveCell.Offset(0, 80).Value = txtIncome_CoBorrowerAlimonyChildSupport
    ActiveCell.Offset(0, 81).Value = txtIncome_AutoPayments
    ActiveCell.Offset(0, 82).Value = txtIncome_RevolvingBalance
    ActiveCell.Offset(0, 83).Value = txtIncome_RevolvingPayments
    ActiveCell.Offset(0, 84).Value = txtIncome_InstallmentPayment
    ActiveCell.Offset(0, 85).Value = txtIncome_Rent
    ActiveCell.Offset(0, 86).Value = txtIncome_TotalAssets
    ActiveCell.Offset(0, 87).Value = cbxIncome_EmploymentStatus
    ActiveCell.Offset(0, 88).Value = cbxIncome_TypeOfWork
    ActiveCell.Offset(0, 89).Value = txtIncome_Company
    ActiveCell.Offset(0, 90).Value = txtIncome_Title
    ActiveCell.Offset(0, 91).Value = txtIncome_YearsAtJob
    ActiveCell.Offset(0, 92).Value = cbxIncome_CoBorrowerEmploymentStatus
    ActiveCell.Offset(0, 93).Value = cbxIncome_CoBorrowerIncomeType
    ActiveCell.Offset(0, 94).Value = txtIncome_CoBorrowerCompany
    ActiveCell.Offset(0, 95).Value = txtIncome_CoBorrowerTitle
    ActiveCell.Offset(0, 96).Value = txtIncome_CoBorrowerYearsAtJob
    ActiveCell.Offset(0, 97).Value = txtIncome_Address1
    ActiveCell.Offset(0, 98).Value = txtIncome_Address2
    ActiveCell.Offset(0, 99).Value = txtIncome_City
    'ActiveCell.Offset(0, 100).Value = UCase(txtIncome_State)
    ActiveCell.Offset(0, 101).Value = txtIncome_Zip
    ActiveCell.Offset(0, 102).Value = txtIncome_Phone
    ActiveCell.Offset(0, 103).Value = txtIncome_Fax
    ActiveCell.Offset(0, 104).Value = txtIncome_Email
    ActiveCell.Offset(0, 105).Value = txtIncome_CoBorrowerAddress1
    ActiveCell.Offset(0, 106).Value = txtIncome_CoBorrowerAddress2
    ActiveCell.Offset(0, 107).Value = txtIncome_CoBorrowerCity
    'ActiveCell.Offset(0, 108).Value = UCase(txtIncome_CoBorrowerState)
    ActiveCell.Offset(0, 109).Value = txtIncome_CoBorrowerZip
    ActiveCell.Offset(0, 110).Value = txtIncome_CoBorrowerPhone
    ActiveCell.Offset(0, 111).Value = txtIncome_CoBorrowerFax
    ActiveCell.Offset(0, 112).Value = txtIncome_CoBorrowerEmail

    MsgBox "through income"
    MsgBox "posted data"

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Josh,

    I think it would be best for you to post a copy of your Workbook due to the length of your code. It would give us a chance to examine it more closely for errors that maight related to links, or events.

    Thanks,
    Leith Ross

  11. #11
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    how do i post my workbook

    How do i post my workbook so someone can look at it?

  12. #12
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    is there anyway i can email anyone this?

    I am having trouble adding it as an attachment.


    I would be very appreciative of any help.


    Thanks


    Josh

  13. #13
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Josh,
    You can e-mail it to me and I'll look at it. I'll post the pertinent changes on the Forum. My e-mail is [email protected].

    Thanks,
    Leith Ross

  14. #14
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Sent it to your email

    Hi Leith,

    I would really appreciate if you could find what is going on in my workbook.


    thanks for you help


    Josh

  15. #15
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Haven't heard back yet.

    Hi Leith,

    Haven't heard back in a couple of days, just curious if you were able to take a look at the workbook.

    thanks

    Josh

  16. #16
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Any ideas as to why this does this

    I finally am able to get the workbook attached.

    I would appreciate if anybody can help me with any suggestions or areas as to where to go for this problem.

    I have created a CRM database.

    The form auto opens on workbook open.


    The problem is as follows.

    The first time in the workbook everything works great.

    2 reminders

    1. Form is blocked from closing, must hit log off to close
    2. Can doubleclick Borrower INfo label to close form (admin shortcut)


    Then for some reason, the next time the workbook opens Excel pops up with this error saying it needs to close and is trying to recover my documents.

    Then I go in under disable macros, go to VBE, then close, save changes yes (although no changes were made). Then get back in to the sheet and it works. Then the 2nd time it doesn't....

    I have tried everything I know, when I comment off everything in the form, I don't have the problem, so I believe the problem is in the form.


    I would appreciate any help.


    Thanks


    Josh
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1