hiermit wird eine Textbox erstellt, nur leider kann ich keinen Text eingeben =/
Bis jetzt bin ich dem Problem noch nicht auf die Spur gekommen!
Wäre toll wenn mit jemand helfen kann! =)
lg
adrian
Sub FirstAddTextfeld(Position As Range)
Anzahl = 1
For Each Objekt In ActiveSheet.OLEObjects
If Objekt.progID = "Forms.TextBox.1" Then
Anzahl = Anzahl + 1
End If
Next
With ActiveSheet
Set Objekt = .OLEObjects.Add(ClassType:="Forms.TextBox.1", Left:=Position.Left, _
Width:=Position.Width, Top:=Position.Top, Height:=Position.Height)
Set TB = Objekt.Object
With TB
.Name = "FirstChoice" & ActiveSheet.ComboBox1.Value & Anzahl
.BackColor = &HE0E0E0
.Font = "Georgia"
.Font.Bold = True
.Font.Size = 16
.TextAlign = fmTextAlignLeft
.EnterKeyBehavior = True
.TabKeyBehavior = True
.Height = 180
.Width = 340
.ScrollBars = fmScrollBarsVertical
.Locked = True
.AutoWordSelect = True
.DragBehavior = fmDragBehaviorDisabled
.WordWrap = True
.MultiLine = True
.SpecialEffect = fmSpecialEffectSunken
.Enabled = True
.SelectionMargin = True
.IntegralHeight = True
.PrintObject = True
.IMEMode = fmIMEModeNoControl
.MousePointer = fmMousePointerDefault
End With
End With
End Sub