I am using VBVA and am trying to split inputstrings into separate fields.
The input data are
When I input A1 and look at the 3rd field (71) in the Locals window, it is shown correctly as "71".
When I input A2 and look at the 3rd field it is shown as "64 " ie, there is a trailing blank.
Does anyone know why this is happening?
In further code, I have tried to remove this blank using TRIM and RTRIM but the blank still remains.
Is there another way of getting rid of the trailing blank?
VBA Code:
Sub strread()
Dim arrsplitstring() As String
Dim temp As String
For i = 1 To 2
inputstring = Cells(i, "a").Value
arrsplitstring = Split(inputstring)
Next i
End Sub
The input data are
When I input A1 and look at the 3rd field (71) in the Locals window, it is shown correctly as "71".
When I input A2 and look at the 3rd field it is shown as "64 " ie, there is a trailing blank.
Does anyone know why this is happening?
In further code, I have tried to remove this blank using TRIM and RTRIM but the blank still remains.
Is there another way of getting rid of the trailing blank?