chuckles1066
Banned
- Joined
- Dec 20, 2004
- Messages
- 372
Hope someone can help, here's the code:
This code then goes on to save various files with the filename workmanname.
And it all works well except there are trailing blank spaces (the original file that the data came from was a text file which may explain it).
I've tried to tidy it by adding the workmanname variable (25 is the longest length of any of the files) but it would be handy to be able to save straightaway without any spaces in the filename.
Something to look at the value of workmannamestart and work out at which position the last character is?
Thanks in advance.
Code:
If Left(Cells(myrowcounter, 1).Value, 20) = "OUTSTANDING PPM FOR:" Then
workmannamestart = Right(Cells(myrowcounter, 1).Value, Len(Cells(myrowcounter, 1).Value) - 21)
workmanname = Left(workmannamestart, 25)
This code then goes on to save various files with the filename workmanname.
And it all works well except there are trailing blank spaces (the original file that the data came from was a text file which may explain it).
I've tried to tidy it by adding the workmanname variable (25 is the longest length of any of the files) but it would be handy to be able to save straightaway without any spaces in the filename.
Something to look at the value of workmannamestart and work out at which position the last character is?
Thanks in advance.