Hi,
have a form trying adapt this code suggested in this site to my userform to be able to edit text boxes to update spreadsheet but when I click update get the compile error "invalid or unqualified reference"
here is the code:
Thank you,
have a form trying adapt this code suggested in this site to my userform to be able to edit text boxes to update spreadsheet but when I click update get the compile error "invalid or unqualified reference"
here is the code:
VBA Code:
Private Sub CommandButton1_Click()
Dim cll As Range
' Find the selected list item value in the data range
Set cll = rng.Columns(1).Find(COGSform.Value, rng.Cells(1, 1), xlValues)
' First column is the lookup range, so we don't update it but the others
COGSform_All.TextBox_Results1.Value = .Cells(.Range(strAddress).Row, 2).Value
COGSform_All.TextBox_Results2.Value = .Cells(.Range(strAddress).Row, 3).Value
COGSform_All.TextBox_Results3.Value = .Cells(.Range(strAddress).Row, 13).Value
COGSform_All.TextBox_Results4.Value = .Cells(.Range(strAddress).Row, 10).Value
COGSform_All.TextBox_Results5.Value = .Cells(.Range(strAddress).Row, 14).Value
COGSform_All.TextBox_Results6.Value = .Cells(.Range(strAddress).Row, 4).Value
COGSform_All.TextBox_Results8.Value = .Cells(.Range(strAddress).Row, 5).Value
COGSform_All.TextBox_Results9.Value = .Cells(.Range(strAddress).Row, 6).Value
COGSform_All.TextBox_Results10.Value = .Cells(.Range(strAddress).Row, 11).Value
COGSform_All.TextBox_Results11.Value = .Cells(.Range(strAddress).Row, 12).Value
COGSform_All.TextBox_Results12.Value = .Cells(.Range(strAddress).Row, 8).Value
COGSform_All.TextBox_Results13.Value = .Cells(.Range(strAddress).Row, 15).Value
COGSform_All.TextBox_Results14.Value = .Cells(.Range(strAddress).Row, 16).Value
COGSform_All.TextBox_Results15.Value = .Cells(.Range(strAddress).Row, 9).Value
COGSform_All.TextBox_Results16.Value = .Cells(.Range(strAddress).Row, 7).Value
COGSform_All.TextBox_Results17.Value = .Cells(.Range(strAddress).Row, 1).Value
'cll.Cells(, 2).Value = TextBox2.Value
'cll.Cells(, 3).Value = TextBox3.Value
End Sub
Thank you,