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

    Prob on import txt.. (2000 sr 1)

    Messaggio cancellato da sal21

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

    Re: Prob on import txt.. (2000 sr 1)

    I don't understand either question.

    1) All lines whose first character is "-" = Chr(45) contain only "-" and nothing else, and there are no lines starting with "A" = Chr(65).
    2) What is Sportello_Corrente? <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

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

    Re: Prob on import txt.. (2000 sr 1)

    With the data file you attached, the macro takes 2.5 seconds on my PC. If I insert

    Application.ScreenUpdating = False

    at the beginning, and

    Application.ScreenUpdating = True

    at the end, it takes just over 2 seconds, so that is about 20% faster.

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

    Re: Prob on import txt.. (2000 sr 1)

    famous esculsion from import ...
    Is possible to import the records only if the var_2 assuming the first 2 character 45 or 65...

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

    Re: Prob on import txt.. (2000 sr 1)

    Still don't understand - the situation is as before.

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

    Re: Prob on import txt.. (2000 sr 1)

    ...
    if you see the txt file the line similar this identify the agency 0101 ANCONA AG.1 and for me the blok for this agency is unti the value change, for example 0149 SENIGALLIA is other agency , ecc...
    In effect for each agency i set the lok do unti this value change.

    For agency 0101 the realted record are only
    21/ 7/1995 867360282 2.500.000 30/ 8/1995 6000 PENNACCHIONI CRISTINe

    for agency 0149 are two
    21/ 5/2001 495010249 3.321.460 10/ 8/2001 3400 VILLA SERENA SRL
    21/ 5/2001 495010250 3.100.000 10/ 7/2001 3400 VILLA SERENA SRL

    ecc...

    naturalluy for my offcie not is important to import all record from all agency.
    Noe for me important is to import the record relatedc from agency that init witnh the first 2 character 45 and 65.
    the index is identify from the line 1$$$ 04500 PC160/A99999999....
    or 4500 NAPOLI

    hope you have understand me now?:-(

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

    Re: Prob on import txt.. (2000 sr 1)

    This is very different from your original question (now deleted)! Change the line

    If Fase = 2 Then

    to

    If Fase = 2 And (Left(var_2, 2) = "45" Or Left(var_2, 2) = "65") Then

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

    Re: Prob on import txt.. (2000 sr 1)

    i am sorry for "This is very different from your original question (now deleted)! Change the line"...
    Now, with your code al work fine.
    Tks.

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

    Re: Prob on import txt.. (2000 sr 1)

    I am sorry, for error i have deleted my attach and first post...(In other case i have solved all prob, now)
    Now is possible to speed the import of txt?

Posting Permissions

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