Question : Writing cbo value to active cell

Hello Experts

The okClick event writes the value selected in cboEquipment on user form to the active cell.  This works fine for the cboEquipment  but the user form has two combos.  How do I add cboEmployees value if that combo is selected instead ?  

Thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
Private Sub cmdOK_Click()
        ActiveWorkbook.Sheets("DTS").Activate
        Range("C15").Select
    Do
If IsEmpty(ActiveCell) = False Then

        ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
    
        ActiveCell.Value = cboEquipment.Value
            
End Sub

Answer : Writing cbo value to active cell

You can run the code for the cboEmployees after the loop

Private Sub cmdOK_Click()
        ActiveWorkbook.Sheets("DTS").Activate
        Range("C15").Select
    Do
If IsEmpty(ActiveCell) = False Then

        ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
   
        ActiveCell.Value = cboEquipment.Value

'-----------------------------------------------

ActiveWorkbook.Sheets("DTS").Activate
        Range("C16").Select
    Do
If IsEmpty(ActiveCell) = False Then

        ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
   
        ActiveCell.Value = cboEmployee.Value
           
End Sub
Random Solutions  
 
programming4us programming4us