Hi I need some help to finish off the userform I have been cobbling together. It is to handle data entry and record when data has been reviewed and deleted
I have also posted the same question (earlier version of requirements) at excelforum.com - Link - they helped me with the filtered listbox but havent been able to provide a solution to my last requirement with the filtered listbox - or i havent understood it properly (which is more likely!!)
There is also the latest version of the workbook on the last post - thanks in advance for any help in resolving this
The form currently allows the following:
What is missing / not working
Please see below for screenshots of the expected user experience and the error that I am currently getting:
I have also posted the same question (earlier version of requirements) at excelforum.com - Link - they helped me with the filtered listbox but havent been able to provide a solution to my last requirement with the filtered listbox - or i havent understood it properly (which is more likely!!)
There is also the latest version of the workbook on the last post - thanks in advance for any help in resolving this
The form currently allows the following:
- Create a new record and write it to the spreadsheet
- Create a folder structure based on the information provided in the data entry page
- A second page displaying a listbox of all of the data currently in the worksheet.
- A user can select a record and a "consultant name" and then mark the data as deleted or reviewed
- Doing this writes to the relevant record / row in the worksheet and fills in the date and consultants name - code is below:
- A user can select a record and a "consultant name" and then mark the data as deleted or reviewed
Code:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit;">Private Sub cmdPeerReview_Click()
Dim r As Long
For r = 0 To lstRecords.ListCount - 1
If lstRecords.Selected(r) Then
Worksheets("Data Storage").Cells(lstRecords.List(r, UBound(lstRecords.List, 2)), 9) _
.Resize(, 3).Value = Array("Yes", cboConsultantName2.Value, Now())
MsgBox "Data Peer Reviewed"
End If
Next
End Sub</code>
- A second listbox that displays all records for a particular customer based upon what is selected in a combobox
Code:
Private Sub cboCustomers_Change()
With Me
.lstRecords.Clear
If Me.cboCustomers.ListIndex > -1 Then .lstRecords.Column = dic(.cboCustomers.Value)
.lstRecords.ColumnCount = 7
.lstRecords.ColumnHeads = True
.lstRecords.ColumnWidths = "75;75;80;125;80;80"
End With
End Sub
What is missing / not working
- being able to select a record from the second listbox and mark it as deleted or reviewed in the worksheet
Please see below for screenshots of the expected user experience and the error that I am currently getting: