Wednesday 8 April 2015

VBA removing last character from the string

Sub removelastchar()
Dim employee_name As String
employee_name = InputBox("Enter the Employee Name")
Range("a1").Value = Trim(Left(employee_name, Len(employee_name) - 1))
End Sub

No comments:

Post a Comment