Good morning!
I have created two user forms in VBA, one that enters "Sample Details" and creates a new sample number, then another that allows the user to edit and enter testing data for the sample. However, I'm having an issue with one textbox not populating the value from the text box into the sheet at all even though all the others seem to work fine. I've checked the code, the textbox settings, and the cell format, but no success. Please see screenshots and code below. Thanks in advance!!
Images Below:
Screenshot of Userform with textbox issue/value circled
Screenshot of spreadsheet where value should have been placed (notice the other values worked fine)
I have the numbers listed in row 5 as more of a reference for me. They indicate the column offset for the value location.
Screenshot of Textbox Properties (tried a screenshot encompassing form too, but image was too large)
I have created two user forms in VBA, one that enters "Sample Details" and creates a new sample number, then another that allows the user to edit and enter testing data for the sample. However, I'm having an issue with one textbox not populating the value from the text box into the sheet at all even though all the others seem to work fine. I've checked the code, the textbox settings, and the cell format, but no success. Please see screenshots and code below. Thanks in advance!!
VBA Code:
Dim TargetRow As Integer 'variable for position control
TargetRow = Sheets("Engine").Range("B5").Value 'make variable equal to COUNTA formula on worksheet
'''BEGIN ATTERBERG INFORMATION'''
Sheets("Data").Range("Data_Start").Offset(TargetRow, 26).Value = LLCupNoText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 27).Value = LLCupWeightText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 28).Value = LLWetWeightText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 29).Value = LLDryWeightText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 30).Value = LLBlowsText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 31).Value = PLCupNoText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 32).Value = PLCupWeightText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 33).Value = PLWetWeightText
Sheets("Data").Range("Data_Start").Offset(TargetRow, 34).Value = PLDryWeightText
'''END ATTERBERG INFORMATION'''
Images Below:
Screenshot of Userform with textbox issue/value circled
Screenshot of spreadsheet where value should have been placed (notice the other values worked fine)
I have the numbers listed in row 5 as more of a reference for me. They indicate the column offset for the value location.
Screenshot of Textbox Properties (tried a screenshot encompassing form too, but image was too large)