Private Sub CommandButton1_Click() Dim r As Range
With Worksheets("Sheet1")
Set r = Range(CBO1.Value)
.Range("G4").Value = CBO1.Value
.Range("G5").Resize(r.Rows.Count, r.Columns.Count).Value = Range(CBO1.Value).Value
End With
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim cpro As Range
Dim cAdd As Range
Dim cFin As Range
Dim ws As Worksheet
Set ws = Worksheets("Sheet3")
' set the range of cells to to populate drop down list and process name attached to that range
For Each cpro In ws.Range("Teams")
With Me.CBO1
.AddItem cpro.Value
.List(.ListCount - 1, 1) = cpro.Offset(0, 1).Value
End With
Next cpro
CBO1.ListIndex = 0
End Sub