dellehurley
Board Regular
- Joined
- Sep 26, 2009
- Messages
- 171
- Office Version
- 365
- Platform
- Windows
Hello MrExcel members
I need help...again. I have figured out how to get the userform to paste the information into several rows. Now I am trying to get the edit function to work, therefore the rows of data need to be added back into the userform. This is the vba for the edit button that I currently have. It only brings up ONE entry.
An individual FileName located in column A is used between 1 to 8 times.
The rows with matching FileName details are the same for each column except for txtRIN1 this is repeats up to txtRIN8, cmbFullName1 this is repeats up to cmbFullName8.
In my attempts to sort this out I added column K & L. Column K contains the number of times a filename repeats (1-8) matches txtRecs, Column L is labelled a,b,c to h. My idea was that txt1 = a, txt2 = b.,
Column J needs to be over written by the code within the save button each time a file is edited.
Any help or advice is appreciated.
File Link
I need help...again. I have figured out how to get the userform to paste the information into several rows. Now I am trying to get the edit function to work, therefore the rows of data need to be added back into the userform. This is the vba for the edit button that I currently have. It only brings up ONE entry.
VBA Code:
Private Sub cmbEdit_Click()
'Code to update the value to respective controls
With Me.lstDatabase
Me.txtFileNo.Value = .List(.ListIndex, 1)
Me.cmbType.Value = .List(.ListIndex, 2)
Me.cmbEvent.Value = .List(.ListIndex, 3)
Me.cmbExt.Value = .List(.ListIndex, 4)
Me.txtRIN1.Value = .List(.ListIndex, 5)
Me.cmbFullName1.Value = .List(.ListIndex, 6)
Me.txtDate.Value = .List(.ListIndex, 7)
Me.txtDescription.Value = .List(.ListIndex, 8)
Me.txtRecs.Value = .List(.ListIndex, 10)
Me.txt1.Value = .List(.ListIndex, 11)
End With
MsgBox "Please make the required changes and click on 'Save' button to update.", vbOKOnly + vbInformation, "Edit"
Me.Tag = "UPDATE"
The rows with matching FileName details are the same for each column except for txtRIN1 this is repeats up to txtRIN8, cmbFullName1 this is repeats up to cmbFullName8.
In my attempts to sort this out I added column K & L. Column K contains the number of times a filename repeats (1-8) matches txtRecs, Column L is labelled a,b,c to h. My idea was that txt1 = a, txt2 = b.,
Column J needs to be over written by the code within the save button each time a file is edited.
Any help or advice is appreciated.
File Link