muhammasif
asked on
Parse
The following code deletes everything from position 22 onwards. Could someone please modify it so that it deletes everything from character 16 BACKWARDS and leaves characters 17 to 21 aligned left on the page?
Thanks.
========================== ========== ========== ====
Do Until EOF(File1)
Line Input #File1, strLine 'Read Line by Line
If Len(Trim(strLine)) > 21 Then
Print #File2, Left(strLine, 21)
Else
Print #File2, strLine
End If
Loop
Thanks.
==========================
Do Until EOF(File1)
Line Input #File1, strLine 'Read Line by Line
If Len(Trim(strLine)) > 21 Then
Print #File2, Left(strLine, 21)
Else
Print #File2, strLine
End If
Loop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops...yeah...I missed that "stop at char 21" part. Make sure to add the ",5" as deighton shows.
homework?
this will print everything starting from character 17 to the end of the string.