Gruppe
Dialog
Problem
Wie kann ich über VBA-Code in einem Tabellenblatt ComboBoxes je Tabellenblattspalte erstellen?
StandardModule: basMain
Sub DropDownKopieren()
Dim oDropDown As DropDown
Dim iRow As Integer
For iRow = 1 To 10
Set oDropDown = ActiveSheet.DropDowns.Add( _
Cells(iRow, 1).Left, _
Cells(iRow, 1).Top, _
Cells(iRow, 1).Width + Cells(iRow, 2).Width, _
Cells(iRow, 1).Height)
With oDropDown
.ListFillRange = Range( _
Cells(1, iRow + 3), Cells(10, iRow + 3)).Address
.LinkedCell = Cells(iRow, 3).Address
.ListIndex = 1
End With
Next iRow
Range("A1").Select
End Sub