I check with this routine if the first cahracter in strbuf is " ".
Is possible to reassign to the same var strbuf the line without the first blank caharcter?
Example:
If Left$(strBuf, 1) = " " Then
'ok have a blank
Debug.Print strBuf
strBuf=new line strBuf without " "
End If
origina line:
aaaaaaaaaa
after trasformation:
aaaaaaaaa
I think Hans understand me
delete the first charachter is left, 1=" "
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78510
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
Re: delete the first charachter is left, 1=" "
Simple and effective!HansV wrote:strBuf = Mid(strBuf, 2)
remember my old post about to skip Host caharcter in txt file....
i loop line by line a txt and i need to skip the line in txt attached how to?
If i dont remeber wrong is a little square, or not?
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78510
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: delete the first charachter is left, 1=" "
There are several characters with ASCII code 12 (form feed) in the file, perhaps you can test for Chr(12).
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
Re: delete the first charachter is left, 1=" "
oK resolved all about Chr(12), tks.HansV wrote:There are several characters with ASCII code 12 (form feed) in the file, perhaps you can test for Chr(12).
Now new "Miracle"
During the loop in txt file when go in this line:
RIFERIMENTO: PAG. NOTE:
the code exit for loop???????????????????????
In debug.print mode i dont see the little arrow, peraphs is a specila Host character?
See wat i have in debug print:
RIFERIMENTO: P
Inother case i dont see the other part after the litle arow, is a Miracle?
-
- Administrator
- Posts: 78510
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: delete the first charachter is left, 1=" "
There could be an end-of-file character (ASCII 26) in the file; this would cause the code to stop reading the file there.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
Re: delete the first charachter is left, 1=" "
and how to trap this error?HansV wrote:There could be an end-of-file character (ASCII 26) in the file; this would cause the code to stop reading the file there.
-
- Administrator
- Posts: 78510
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: delete the first charachter is left, 1=" "
You can't, if you open the file as a text file. You can only work around the end-of-file character if you open the file as binary, but that is very complicated.
Where does this file come from?
Where does this file come from?
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
Re: delete the first charachter is left, 1=" "
Host!HansV wrote:You can't, if you open the file as a text file. You can only work around the end-of-file character if you open the file as binary, but that is very complicated.
Where does this file come from?
-
- Administrator
- Posts: 78510
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: delete the first charachter is left, 1=" "
That is outside my field, I'm afraid I can't help you with that. Sorry.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4357
- Joined: 26 Apr 2010, 17:36
Re: delete the first charachter is left, 1=" "
No prob, tks in other case.HansV wrote:That is outside my field, I'm afraid I can't help you with that. Sorry.
I caal my Admin and suggest to skip all Host command Chr when the file is created, i think is possible with a Cics.