Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

Dropdown Excel vba, Kombinationsfeld ".Linkedcell"

Forumthread: Dropdown Excel vba, Kombinationsfeld ".Linkedcell"

Dropdown Excel vba, Kombinationsfeld ".Linkedcell"
02.04.2013 13:13:56
Sergej
Hallo ich möchte über vba mehrere kombinationsfelder (formularsteuerelement) einfügen.
Das klappt auch alles wunderbar, mein Problem ist allerdingsd, dass jedes Kombinationsfeld eine unterschiedliche Zelle für die Ausgabe bekommen soll.
Der Ausgabewert wird über den Befehl " .LinkedCell = " gesteuert. Momentan steht dort eine Zelle zum Beispil "I8". Ich möchte das allerdings von einer Variable abhängig machen, wie kann ich das machen?
Besten Dank im Voraus! Sergej

Private Sub CommandButton1_Click()
Dim i As Integer
i = 105
For i = 0 To 105
ActiveSheet.DropDowns.Add(360, i, 60, 15.75).Select
i = i + 15
With Selection
.ListFillRange = "tb_Treibhausgase"
.LinkedCell = "I8"
.DropDownLines = 4
.Display3DShading = True
End With
Next
End Sub

Anzeige

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Dropdown Excel vba, Kombinationsfeld ".Linkedcell"
02.04.2013 13:17:28
Hajo_Zi
schreibe
.LinkedCell = "I" & I+8

AW: Dropdown Excel vba, Kombinationsfeld ".Linkedcell"
02.04.2013 13:59:54
Rudi
Hallo,
würd ich eher in der Form machen:
Private Sub CommandButton1_Click()
Dim i As Integer, objDD As Object
Application.ScreenUpdating = False
For i = 1 To 8
Set objDD = ActiveSheet.DropDowns.Add(1, 1, 1, 1)
With objDD
.Top = Rows(i).Top
.Left = Columns(7).Left
.Height = Rows(i).Height
.Width = 60
.ListFillRange = "tb_Treibhausgase"
.LinkedCell = Cells(i, 9).Address
.DropDownLines = 4
.Display3DShading = True
End With
Next
End Sub

Gruß
Rudi
Anzeige
Anzeige
Anzeige
Anzeige
Live-Forum - Die aktuellen Beiträge
Datum
Titel
14.05.2026 13:31:09
14.05.2026 09:50:42
13.05.2026 19:14:18