Trying to create and update button to edit a record in a spreadsheet - the following code is being used - but when I select the row to update the area highlighted in red shows Runtime error #1004 - Application or Object defined error.
Can anyone advise ?
Private Sub cmdUpdate_Click()
Dim fullname As String
fullname = txtfullname.Text
Cells(currentrow, 1).Value = fullname
hiredate = txthiredate.Text
Cells(currentrow, 2).Value = hiredate
aht = txtaht.Text
Cells(currentrow, 3).Value = aht
acw = txtacw.Text
Cells(currentrow, 4).Value = acw
quality = txtquality.Text
Cells(currentrow, 5).Value = quality
departments = cbodepartments.Text
Cells(currentrow, 6).Value = departments
adherence = txtadherence.Text
Cells(currentrow, 7).Value = adhenerce
voc = txtvoc.Text
Cells(currentrow, 8).Value = voc
nps = txtdnp.Text
Cells(currentrow, 9).Value = nps
fcr = txtfcr.Text
Cells(currentrow, 10).Value = fcr
teams = cboteams.Text
Cells(currentrow, 11).Value = teams
End Sub
Best Regards,
John
Bookmarks