refine userform loading

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
771
Office Version
  1. 365
Platform
  1. Windows
Afternoon All,

I am using the VB below to load a userform.
I have been asked to also filter the userform loading by manager as well as Call Centre Manager.

I load the userform by selecting the name of the CSM "Ashley Longman" ( Below ) but i have also been asked to futher refine the search to manager instead of just the next open query. The managers name is refined in combobox2, where as the CSM name is refined in Combobox1. Is there anyway i can adjust the existing code as the manager name is in column C (i, 3).

Any help would be appreciated even if i have to rewrite the code as i am new to VB. I understand the part about the userform loading just not refining the search.

Many Thanks
:confused:
Code:
Dim iRow As Long
Dim ws As Worksheet
Dim lRow As Long
Set ws = Worksheets("Ashley Longman")
If UserForm2.ComboBox1 = "Ashley Longman" Then
    Pword = InputBox("Please enter password")
    If Pword = "ticket" Then
        ActiveWorkbook.Sheets("Ashley Longman").Activate
    Else
        MsgBox "Please contact your system provider for a password"
        Exit Sub
    End If
 
    Unload Me
     lRow = Range("N" & Rows.Count).End(xlUp).Row + 1
     For i = 3 To lRow
        If Cells(i, 1).Value = "" Then Exit For
        If Cells(i, 1).Value <> "" And Cells(i, 14).Value = "" Then
            gotcha = True
            UserForm1.Show False
          'Info after this to load the userform
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,552
Messages
6,179,486
Members
452,917
Latest member
MrsMSalt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top