Optionsbutton LinkedCell mit VBA zuweisen
Peter.H
die Art wie ich die LinkedCell zuweise funktioniert nicht...
Wie muss ich das richtig zuweisen?
Option Explicit
Const iCol_1 As Integer = 1 + 1
Sub Opt()
Dim i As Integer
With Tabelle1
For i = 2 To 10
.OLEObjects.Add(ClassType:="Forms.OptionButton.1", _
Left:=.Cells(i, iCol_1).Left, Top:=.Cells(i, iCol_1).Top, _
Width:=.Cells(i, iCol_1).Width, Height:=.Cells(i, iCol_1).Height).Name = "a" & i
.OLEObjects("a" & i).Object.GroupName = "Frage_" & i
.OLEObjects("a" & i).Object.Caption = ""
.OLEObjects("a" & i).Object.BackColor = &H80000015
'**** das funktioniert nicht *****
.OLEObjects("a" & i).Object.LinkedCell = .Cells(i, iCol_1).Address
'****Meldung ist: Laufzeitfehler 438 - Objekt unterstützt diese Methode nicht
Next i
End With
End Sub
Gruß
Peter