View Single Post
 
Old 05-16-2019, 05:04 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Point 3:
How about adding a 'Do Not Call' column which gets an 'X' written to it for every record of that particular company?
Something along the lines of this within the SubmitBtn_Click procedure
Code:
'
    Dim oLo As ListObject

Set oLo = ActiveSheet.ListObjects(1)    'first table of active sheet
'
'
'------------ CALLBACK OPTION CHOICE---------------

If CallbackY.Value = True Then
            Cells(lngrow, 7) = "Yes"
ElseIf CallbackN.Value = True Then
            Cells(lngrow, 7) = "No"
            'add X to 'DoNotCall' for all rows of this company
            With oLo.Range
                .AutoFilter     'remove any existing filters
                .AutoFilter Field:=4, Criteria1:=CompanyName.Value, Operator:=xlFilterValues
                oLo.ListColumns(13).DataBodyRange.Cells.Value = "X"
                .AutoFilter     'remove filter
            End With
Else
End If
 '
Point 4:
Move the code from UserForm_Initialize to a procedure of its own and have UserForm_Initialize call that procedure.
You can then refresh (re-initialize) from anywhere by calling that procedure.
For example at the end of CloseBtn_Click just before hiding the form, at the end of ResetBtn_Click and SubmitBtn_Click.

Have a look at the attached file and see if it does the things you're after.
I unchecked the vba reference to Microsoft Windows Common Controls 6.0 (SP6) in order to run your file on my computer.
Attached Files
File Type: xlsm Call tracker draft 3b.xlsm (181.5 KB, 11 views)
Reply With Quote