Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Intercep character.. (6.0)

    Durng the import of string from txt file i have see the var TEST is filled with the character in image...
    How to intercept this? (little square)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Intercep character.. (6.0)

    When you see this (i.e. while code execution is halted), activate the Immediate window (Ctrl+G).
    Type the following:
    <code>
    ? Asc(TEST)
    </code>
    and press Enter. You will see the ASCII code of the character. If it is 12, for example, you can test for it as follows:
    <code>
    If TEST = Chr(12) Then
    ...
    End If</code>

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Intercep character.. (6.0)

    TKS for explain!
    Now i have know new tips ((Ctrl+G)) is important to test "on fly" a command to debug code, or not?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Intercep character.. (6.0)

    The Immediate window (activated by Ctrl+G) is very handy to test code "on the fly". You can simply enter a line of code and press Enter.
    You can use ? to display the value of a variable or expression in the Immediate window, for example
    <code>
    ? 27 + 35
    </code>
    or
    <code>
    ? Len(MyVar)
    </code>
    where MyVar is a string variable.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Intercep character.. (6.0)

    <big>Edited by HansV to remove lots of useless white space from picture</big>

    WHY!!!!
    I have insert a test to skip the line TEST with left 1 = Chr(12) and the code not intecept the condition????

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Intercep character.. (6.0)

    Apparently the "box" character at the beginning of this line is different from Chr(12). You should test the way I showed you in my first reply in this thread.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Intercep character.. (6.0)

    No resolved...Cannot intercept laso is i use you trick ? asc...
    If you see after line with sequence of 1, 2, 3 or 4 is present a page break...or line break or other.
    And i dont want to import this line...
    note:
    To see the line break i use Ultraedit. i dont know if other edit show this type of line

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Intercep character.. (6.0)

    When I open this file interactively or using VBA it is seen as one long line of over 10,000 characters in length. It contains a lot of Chr(10) characters and a few Chr(12) characters.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •