New Member
April 13, 2020
Hi,
Need assistance, I have created a form for my team which has 2 combo box and their are same names for selection in both the combo box and I need to make sure that the user can't select the same name if they have already selected it in either of the combo box.
Can someone please help.
Below is the code written
Sub Reset()
Dim Irow As Long
Irow = [Counta(Database!A:A)] ' idetiying the last row
With frmForm
.txtNAME.Value = ""
.cmbDM.Clear
.txtDATE.Value = Date
.optWaterfall.Value = False
.optAgile.Value = False
.cmbDOD.Clear
.cmbDM.AddItem "Accept Core MOPs"
.cmbDM.AddItem "Accept ALT Mops"
.cmbDM.AddItem "Digital Connect"
.cmbDM.AddItem "Field"
.cmbDM.AddItem "Inform"
.cmbDM.AddItem "POS Solution"
.cmbDM.AddItem "Servicing"
.cmbDM.AddItem "Value Added Services"
.cmbDOD.AddItem "TBD"
.cmbDOD.AddItem "Yes"
.cmbDOD.AddItem "No"
.txtRowNumber.Value = ""
.txtEXPTC.Value = ""
.txtACTC.Value = ""
.cmbTDC.Clear
.cmbTDC.AddItem "TBD"
.cmbTDC.AddItem "Self Created"
.cmbTDC.AddItem "Mixed"
.cmbTDC.AddItem "External"
.cmbPT.Clear
.cmbST.Clear
.cmbPT.AddItem "Divya Sivananda"
.cmbPT.AddItem "Francis G Burton"
.cmbPT.AddItem "Jane Reid"
.cmbPT.AddItem "Jeffrey R Wyman"
.cmbPT.AddItem "Latha Madasu"
.cmbPT.AddItem "Mauric Wimms"
.cmbPT.AddItem "Mohammed S Shaikh"
.cmbPT.AddItem "Mubin Bharde"
.cmbPT.AddItem "Nishit Bhatt"
.cmbPT.AddItem "Nolan Jones"
.cmbPT.AddItem "Ram Pandey"
.cmbPT.AddItem "Rugved Phatak"
.cmbPT.AddItem "Shamekia R Keaton"
.cmbPT.AddItem "Sunam Koirala"
.cmbPT.AddItem "Swapna Malkan"
.cmbPT.AddItem "Tiffany A Blevin"
.cmbPT.AddItem "Trupti Kulkarni"
.cmbST.AddItem "Divya Sivananda"
.cmbST.AddItem "Francis G Burton"
.cmbST.AddItem "Jane Reid"
.cmbST.AddItem "Jeffrey R Wyman"
.cmbST.AddItem "Latha Madasu"
.cmbST.AddItem "Mauric Wimms"
.cmbST.AddItem "Mohammed S Shaikh"
.cmbST.AddItem "Mubin Bharde"
.cmbST.AddItem "Nishit Bhatt"
.cmbST.AddItem "Nolan Jones"
.cmbST.AddItem "Ram Pandey"
.cmbST.AddItem "Rugved Phatak"
.cmbST.AddItem "Shamekia R Keaton"
.cmbST.AddItem "Sunam Koirala"
.cmbST.AddItem "Swapna Malkan"
.cmbST.AddItem "Tiffany A Blevin"
.cmbST.AddItem "Trupti Kulkarni"
.lstDatabase.ColumnCount = 13
.lstDatabase.ColumnHeads = True
.lstDatabase.ColumnWidths = "30,200,100,75,75,60,60,60,75,100,100,100,100"
If Irow > 1 Then
.lstDatabase.RowSource = "Database!A2:M" & Irow
Else
.lstDatabase.RowSource = "Database!A2:M2"
End If
End With
October 5, 2010
Hi Nishit,
Please see attached workbook for working solution.
Couple of things. In the code you sent, you are referencing a control called txtDATE that does not exist. I had to comment out any lines referencing this that I came across, there may be more that need fixing.
You've named the Full Time Team Member combobox cmbPT and the Part Time Team Member combobox cmbST. I'd expected the Full Time box to be cmbFT and the Part Time one cmbPT?
Regards
Phil
1 Guest(s)