Kommentare
25.07.2006 12:25:19
otto
folgender Code ist auf einer Schaltfläche in einer UF hinterlegt.
Wenn in der Zelle (az+1,50) noch kein Kommentar ist funktioniert alles, wenn aber schon einer drin ist kommt ein Fehler - Wieso?
Private Sub OK_Click()
az = ActiveCell.Row
Dim text
text = TextBox1.text
On Error GoTo Kommentar
Cells(az + 1, 50).AddComment text
Exit Sub
Kommentar:
Cells(az + 1, 50).Comment.text = text
Unload Me
End Sub
Hier noch Initialize:
Private Sub UserForm_Initialize()
On Error GoTo überspringen
Dim text As Variant
az = ActiveCell.Row
text = Cells(az + 1, 50).Comment.text
TextBox1 = text
überspringen:
End Sub
Gruß otto