Yodelayheewho
Member
Hello Everyone!
I needed to add more notes to one of my Shop Orders (MSO-40254). I enter the notes into a textbox (TextNotes) that is set as multiline. See attached for all the property settings.
This particular Shop Order has had a lot of activity, so there are a lot of notes. The following shows the word count, etc.
To troubleshoot, I searched other Shop Orders and clicked Update and Save - and received no error message.
I did some reading and understand the multiline textbox has no character/line limits. However, I can't figure out what else it could be. This code has been working for months.
The error is pointing to the line in red text below.
I provide a sample file whenever possible, but for this, it would a long time to desensitize the data. I'm hoping I can resolve it without a sample file.
Thank you in advance!
I needed to add more notes to one of my Shop Orders (MSO-40254). I enter the notes into a textbox (TextNotes) that is set as multiline. See attached for all the property settings.
This particular Shop Order has had a lot of activity, so there are a lot of notes. The following shows the word count, etc.
To troubleshoot, I searched other Shop Orders and clicked Update and Save - and received no error message.
I did some reading and understand the multiline textbox has no character/line limits. However, I can't figure out what else it could be. This code has been working for months.
The error is pointing to the line in red text below.
I provide a sample file whenever possible, but for this, it would a long time to desensitize the data. I'm hoping I can resolve it without a sample file.
Thank you in advance!
Code:
'Update and Save Button'
Private Sub UpdateandSaveOrder_Click()
Dim Shop_Order_Number As String
Shop_Order_Number = Trim(TextShopOrderNumber)
lastrow = Worksheets("Master").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
If Worksheets("Master").Cells(i, 4).Value = Shop_Order_Number Then
Worksheets("Master").Cells(i, 1).Value = TextPrefix
Worksheets("Master").Cells(i, 2).Value = TextE10Status
Worksheets("Master").Cells(i, 3).Value = TextSuffix
Worksheets("Master").Cells(i, 4).Value = TextShopOrderNumber
Worksheets("Master").Cells(i, 5).Value = TextEmailSubjectLine
Worksheets("Master").Cells(i, 6).Value = TextNotes
Worksheets("Master").Cells(i, 7).Value = TextStage
Worksheets("Master").Cells(i, 8).Value = TextStartDate
Worksheets("Master").Cells(i, 9).Value = TextStageDue
Worksheets("Master").Cells(i, 10).Value = TextEndDate
Worksheets("Master").Cells(i, 11).Value = TextProposalNumber
Worksheets("Master").Cells(i, 12).Value = TextSalespersonInitials
Worksheets("Master").Cells(i, 13).Value = TextSalesperson
Worksheets("Master").Cells(i, 14).Value = TextProposalDate
Worksheets("Master").Cells(i, 15).Value = TextLeadTime
Worksheets("Master").Cells(i, 16).Value = TextPromisedDate
Worksheets("Master").Cells(i, 17).Value = TextProposalTerms
Worksheets("Master").Cells(i, 18).Value = TextExpirationDate
Worksheets("Master").Cells(i, 19).Value = TextCost
Worksheets("Master").Cells(i, 20).Value = TextMargin
Worksheets("Master").Cells(i, 21).Value = TextPONumber
Worksheets("Master").Cells(i, 22).Value = TextPODate
Worksheets("Master").Cells(i, 23).Value = TextPOReceivedDate
Worksheets("Master").Cells(i, 24).Value = TextPOAmount
Worksheets("Master").Cells(i, 25).Value = TextPOTerms
Worksheets("Master").Cells(i, 26).Value = TextAccessTermsCode
Worksheets("Master").Cells(i, 27).Value = TextShipVia
Worksheets("Master").Cells(i, 28).Value = TextShipType
Worksheets("Master").Cells(i, 29).Value = TextShipCharges
Worksheets("Master").Cells(i, 30).Value = TextShippingInstructions
Worksheets("Master").Cells(i, 31).Value = TextSalesOrderNumber
Worksheets("Master").Cells(i, 32).Value = TextQuoteNumber
Worksheets("Master").Cells(i, 33).Value = TextProjectManagerInitials
Worksheets("Master").Cells(i, 34).Value = TextProjectManager
Worksheets("Master").Cells(i, 35).Value = TextElectronicEngineer
Worksheets("Master").Cells(i, 36).Value = TextSystemDescription
Worksheets("Master").Cells(i, 37).Value = TextSCode
Worksheets("Master").Cells(i, 38).Value = TextBMTH
Worksheets("Master").Cells(i, 39).Value = TextTransferOrderNumber
Worksheets("Master").Cells(i, 40).Value = TextMultipleLines
Worksheets("Master").Cells(i, 41).Value = TextStandardPartsIncluded
Worksheets("Master").Cells(i, 42).Value = TextInstallationDays
Worksheets("Master").Cells(i, 43).Value = TextStartUpDays
Worksheets("Master").Cells(i, 44).Value = TextTrainingDaysOnsite
Worksheets("Master").Cells(i, 45).Value = TextTrainingDaysToledo
Worksheets("Master").Cells(i, 46).Value = TextVendorFieldServiceDays
Worksheets("Master").Cells(i, 47).Value = TextServiceTechnician
Worksheets("Master").Cells(i, 48).Value = TextStandardHours1and2
Worksheets("Master").Cells(i, 49).Value = TextStandardHours3
Worksheets("Master").Cells(i, 50).Value = TextSaturdaySundayorHolidays
Worksheets("Master").Cells(i, 51).Value = TextAdditionalOvertime
Worksheets("Master").Cells(i, 52).Value = TextTravelLessThan8Hours
Worksheets("Master").Cells(i, 53).Value = TextTravelMoreThan8Hours
Worksheets("Master").Cells(i, 54).Value = TextAirfare
Worksheets("Master").Cells(i, 55).Value = TextHotel
Worksheets("Master").Cells(i, 56).Value = TextCarRental
Worksheets("Master").Cells(i, 57).Value = TextMeals
Worksheets("Master").Cells(i, 58).Value = TextMileage
Worksheets("Master").Cells(i, 59).Value = TextParking
Worksheets("Master").Cells(i, 60).Value = TextServiceParts1
Worksheets("Master").Cells(i, 61).Value = TextServiceParts2
Worksheets("Master").Cells(i, 62).Value = TextBookingFees
Worksheets("Master").Cells(i, 63).Value = TextOptionalDescription
Worksheets("Master").Cells(i, 64).Value = TextTotal
Worksheets("Master").Cells(i, 65).Value = TextServiceGroup
Worksheets("Master").Cells(i, 66).Value = TextEnteredinE10
Worksheets("Master").Cells(i, 67).Value = TextConfirmationofPO
Worksheets("Master").Cells(i, 68).Value = TextRequestApproval
Worksheets("Master").Cells(i, 69).Value = TextRequestPM
Worksheets("Master").Cells(i, 70).Value = TextPMAssigned
Worksheets("Master").Cells(i, 71).Value = TextFoldersCopied
Worksheets("Master").Cells(i, 72).Value = TextSOtoTeamPM
Worksheets("Master").Cells(i, 73).Value = TextApproved
Worksheets("Master").Cells(i, 74).Value = TextSOAtoCustomer
Worksheets("Master").Cells(i, 75).Value = TextSOADateinE10
Worksheets("Master").Cells(i, 76).Value = TextEnteredinAccess
Worksheets("Master").Cells(i, 77).Value = TextRequestInvoice
Worksheets("Master").Cells(i, 78).Value = TextReceivedInvoice
Worksheets("Master").Cells(i, 79).Value = TextInvoiceNumber
Worksheets("Master").Cells(i, 80).Value = TextCustomerName
Worksheets("Master").Cells(i, 81).Value = TextDiamondDistributor
Worksheets("Master").Cells(i, 82).Value = TextAKAorNickname
Worksheets("Master").Cells(i, 83).Value = TextCUSTID
Worksheets("Master").Cells(i, 84).Value = TextAccessCUSTID
Worksheets("Master").Cells(i, 85).Value = TextBillToName
Worksheets("Master").Cells(i, 86).Value = TextBillToAddress1
Worksheets("Master").Cells(i, 87).Value = TextBillToAddress2
Worksheets("Master").Cells(i, 88).Value = TextBillToCity
Worksheets("Master").Cells(i, 89).Value = TextBillToState
Worksheets("Master").Cells(i, 90).Value = TextBillToZipCode
Worksheets("Master").Cells(i, 91).Value = TextBillToCountry
Worksheets("Master").Cells(i, 92).Value = TextAltBillToName
Worksheets("Master").Cells(i, 93).Value = TextAltBillToID
Worksheets("Master").Cells(i, 94).Value = TextTaxExempt
Worksheets("Master").Cells(i, 95).Value = TextContact1Name
Worksheets("Master").Cells(i, 96).Value = TextContact1Email
Worksheets("Master").Cells(i, 97).Value = TextContact2Name
Worksheets("Master").Cells(i, 98).Value = TextContact2Email
Worksheets("Master").Cells(i, 99).Value = TextShipToID
Worksheets("Master").Cells(i, 100).Value = TextAccessShipToID
Worksheets("Master").Cells(i, 101).Value = TextShipToName
Worksheets("Master").Cells(i, 102).Value = TextShipToAddress1
Worksheets("Master").Cells(i, 103).Value = TextShipToAddress2
Worksheets("Master").Cells(i, 104).Value = TextShipToCity
Worksheets("Master").Cells(i, 105).Value = TextShipToState
Worksheets("Master").Cells(i, 106).Value = TextShipToZipCode
Worksheets("Master").Cells(i, 107).Value = TextShipToCountry
Worksheets("Master").Cells(i, 108).Value = TextEndUserName
Worksheets("Master").Cells(i, 109).Value = TextEndUserID
Worksheets("Master").Cells(i, 110).Value = TextAccessEndUserID
Worksheets("Master").Cells(i, 111).Value = TextRansburgReport
Worksheets("Master").Cells(i, 112).Value = TextBGKReport
Worksheets("Master").Cells(i, 113).Value = TextShippedYesorNo
Worksheets("Master").Cells(i, 114).Value = TextShipDate
Worksheets("Master").Cells(i, 115).Value = TextPromiseDateAKAShipDate
Worksheets("Master").Cells(i, 116).Value = TextExpectedShipDateAKARecognizeRevenue
Worksheets("Master").Cells(i, 117).Value = TextStatusUpdated
End If
Next
ActiveWorkbook.Save
End Sub