Page 7 of 11 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 102

Thread: VBA Copy Rows From One Workbook To text csv File Based On Count In Different Workbook. Cross Posted Chaos

  1. #61
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    ok bro but you understood what i mean to say

  2. #62
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7
    I am not sure

    btw.
    Bro (novel), a novel by Vladimir Sorokin
    Bro (TV channel), a Philippines TV network
    Bro (instrument), a Vietnamese musical instrument

    as I said, try to not use slang and mental shortcuts or street language
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

  3. #63
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    No Doubt Macro is not correct
    macro saved the file as tab delimited & i dont want that to happen it should saved the file as xlcsv
    So plz correct the macro Sir
    Last edited by fixer; 05-07-2020 at 06:22 PM.

  4. #64
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7

    Cool

    post#54
    change line
    Code:
     Let rngOut.Value = Evaluate("If({1},SUBSTITUTE(" & rngOut.Address & ", ""0"", """"))")
    to
    Code:
     Let rngOut.Value = Evaluate("If({1},SUBSTITUTE(" & rngOut.Address & ", ""0"", "",""))")
    I really don't know what I did but it works

    CSV

    csv1.png

    and after open in Excel

    NSE
    6
    A GTT
    NSE
    6
    A GTT
    NSE
    6
    A GTT
    NSE
    6
    A GTT
    NSE
    6
    A GTT
    Last edited by sandy666; 05-07-2020 at 07:54 PM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

  5. #65
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Sandy Sir Thnx Alot, now i ran the macro and i saw the details
    Now the issue is with file saving method
    Code:
    w1.Close
     w2.Save
     Let Application.DisplayAlerts = False
     w2.Close
     Let Application.DisplayAlerts = True
     w3.Close
    '
    End Sub
    Something is causing mistake from these lines plz have a look Sandy Sir
    some changes is required in this
    w1 and w3 is safe, issue is with w2 plz see
    Last edited by fixer; 05-07-2020 at 10:04 PM.

  6. #66
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7
    as I said before: plz = PLEASE ! so use it

    I used the same code with changes from post #65 and I don't see any problem
    You even didn't show any error

    and again: I DON'T KNOW VBA so don't ask me about it
    Hope you understand plain English
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

  7. #67
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Yes i also saw the correct output but when i save the files and opem it again then i am getting incorrect output

  8. #68
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    7
    2.csv should be blank or contain last proper result, if not run macro again without any changes

    but why this is happening I don't know

    ask author of this code
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

  9. #69
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    sure sandy Sir

  10. #70
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    The only problem is with saving of the file
    Macro is doing perfect job, but when it comes to saving then there is an issue
    Problem start with this line Doc Sir
    [/CODE]w1.Close
    w2.Save
    Let Application.DisplayAlerts = False
    w2.Close
    Let Application.DisplayAlerts = True
    w3.Close
    '
    End Sub[/CODE]
    ignore w1 & w3 they are not csv file, w2 is the csv file
    W2 saving line has some issue Doc Sir Plz have a look on that

Similar Threads

  1. Replies: 4
    Last Post: 04-10-2014, 10:58 PM
  2. Replies: 2
    Last Post: 09-18-2013, 12:30 AM
  3. TO convert Excel entire workbook in csv format
    By pritee in forum Excel Help
    Replies: 11
    Last Post: 08-16-2013, 11:28 AM
  4. Replies: 4
    Last Post: 06-20-2013, 04:25 PM
  5. Replies: 9
    Last Post: 09-09-2011, 02:30 AM

Tags for this Thread

Posting Permissions

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