Gruppe
Ereignis
Problem
Wie kann ich bei einem Doppelklick auf eine Zelle in Abhängigkeit vom Zellinhalt eine Textbox mit Text einfügen?
ClassModule: Tabelle2
Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Range, Cancel As Boolean)
Dim oTxtBox As Object
If Target.Column <> 1 Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
Cancel = True
With Target.Offset(0, 1)
Set oTxtBox = Me.TextBoxes.Add( _
.Left, .Top, .Width, .Height)
End With
oTxtBox.Text = "Text zu " & Target.Value
End Sub