CannotEditRange.zip
Code:
Sub t()
''' Retain every first character of each cell in Table 1
Dim oRange As Range
With Selection
Set oRange = .Range
With oRange
.Start = .Start - 1
.Delete ''' Run-time error 5904: Cannot edit Range
End With
End With
End Sub
There's a table with 3 cells / rows.
Each row has a string like "abcde".
I want to delete all the characters except the first one.
I don't know why my codes above only show errors when the strings are inside a table cell. (If "abcde" is in a paragraph, it works)