Hi All,
I have a VBA form, ViewEditStakeholders, which I use to scroll through existing records I added using a different VBA Form AddNewStakeholders. The forms to add and search the records work fine, but I cannot get the code to update a recorded if the entry in the ViewEditStakeholders form has been changed. I have added the code below and an image of the form. You will see where the records appear on the right after seaching. I want to be able to change these and update the table after clicking the update button. you will notice I have a delete record button also, I have not started coding this yet as I cannot get the records to update so definitely cannot get a row to delete.
Screenshot 2015-11-17 08.53.26.png
Private Sub cmdSHUpdate_Click()
Dim SHID As String, SHName As String, SHCompany As String, SHDept As String, SHEmail As String, SHCategory As String
'this does not work at all... PLEASE CHECK IT OUT
cRow = Me.TextSHID.Value
Set currentrow = Range("RngSH").Find(What:=cRow, LookIn:=xlValues).Offset(0, 0)
SHID = TextSHID.Text
Cells(currentrow, 1).Value = SHID
SHName = TextSHName.Text
Cells(currentrow, 2).Value = SHName
SHCompany = TextSHCompany.Text
Cells(currentrow, 3).Value = SHCompany
SHDept = TextSHDept.Text
Cells(currentrow, 4).Value = SHDept
SHEmail = TextSHEmail.Text
Cells(currentrow, 5).Value = SHEmail
SHCategory = cmbSHCategory.Text
Cells(currentrow, 6).Value = SHCategory
End Sub
Bookmarks