Hello, I am new to VBA.
I need help understanding why this code is throwing an error.
VBA Code: Use to delete the characters from a string.
It is working fine in the original sheet but throwing errors in another sheet.
Please help me with this.
Thank you!
I need help understanding why this code is throwing an error.
VBA Code: Use to delete the characters from a string.
It is working fine in the original sheet but throwing errors in another sheet.
VBA Code:
Sub Delete_Left_Text()
Worksheets("sheet2").Activate
Dim c As Range
With Range("B1")
For Each c In Range("B2", .Offset(.CurrentRegion.Rows.Count - 1))
c.Value = Right(c.Value, Len(c.Value) - 27)[/COLOR] <<<Error on this line
Next c
End With
End Sub
Please help me with this.
Thank you!
Last edited: