Zwei daraufvolgende solcher zeiche "Chr(10)" in einer Vareablen durch eines erstzen.
Ich hoffe das ich es irgend wie verstentlich erklähren konte.
Vielen dank Gerhard
Sub Gerhard()
Dim sK As String
sK = ActiveCell.Comment.Text
If InStr(sK, Chr(10) & Chr(10)) > 0 Then
sK = WorksheetFunction.Substitute(sK, Chr(10) & Chr(10), Chr(10))
End If
End Sub
Sub Gerhard()
Dim sK As String
sK = ActiveCell.Comment.Text
If InStr(sK, Chr(10) & Chr(10)) > 0 Then
sK = WorksheetFunction.Substitute(sK, Chr(10) & Chr(10), Chr(10))
ActiveCell.Comment.Text Text:=sK
End If
End Sub
Sub Gerhard()
Dim sK As String
Dim b As Byte
sK = ActiveCell.Comment.Text
If InStr(sK, vbCr) > 0 Then
sK = WorksheetFunction.Substitute(sK, vbCr, vbLf)
End If
For b = 1 To 2
If InStr(sK, vbLf & vbLf) > 0 Then
sK = WorksheetFunction.Substitute(sK, vbLf & vbLf, vbLf)
End If
Next b
ActiveCell.Comment.Text Text:=sK
End Sub