+ Reply to Thread
Results 1 to 10 of 10

edit code for rename files one time and pickup from folder

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    edit code for rename files one time and pickup from folder

    Hello everyone
    please can check this code and let me know what the problem
    with browse code
    why this code only pick up every time one file in folder, I want to pick up all files inside folder one time
    when apply new pick up, it's not deleted all row, if there is data in new name column its leave it , I want to delete all row of old data
    some time when I cancel pickup dialogue its give error with the following line
    For Each iFiles In xFolder.Files


    with rename code
    check if any cell in new name column is empty and give message some cell empty, because my code change file name even new name its empty (change file name to empty)
    and also why this code rename file one by one because every time show message
    code for browse
    Please Login or Register  to view this content.
    code for rename
    Please Login or Register  to view this content.
    code for rest
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mazan2010; 09-05-2020 at 07:48 PM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: edit code for rename files one time and pickup from folder

    I am not following most of what you said, but these words by you:
    Quote Originally Posted by mazan2010 View Post
    why this code only pick up every time one file in folder, I want to pick up all files inside folder one time
    more than likely, you're only getting one file operated on because of this:
    Please Login or Register  to view this content.
    if your comment is correct, then you are exiting the routine during the first iteration of the loop. aren't you?

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: edit code for rename files one time and pickup from folder

    i edit code browse button as the follow
    Please Login or Register  to view this content.
    i replace the folliwng line
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: edit code for rename files one time and pickup from folder

    OK well that's great. but you haven't said anything else. so did the fixes you make result in a solution for you?

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: edit code for rename files one time and pickup from folder

    for browse code its fixed now ,
    and im still working for rename code to fix it

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: edit code for rename files one time and pickup from folder

    Quote Originally Posted by mazan2010 View Post
    and im still working for rename code to fix it
    I assume that means you're working on it on your own, or are you asking for assistance?

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: edit code for rename files one time and pickup from folder

    Even I post for assistance here I also try with my self to solve it, even by trial and error , and when i find solution i post it

  8. #8
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: edit code for rename files one time and pickup from folder

    Quote Originally Posted by mazan2010 View Post
    Even I post for assistance here I also try with my self to solve it, even by trial and error , and when i find solution i post it
    ummmm....so do you need help or not?

  9. #9
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: edit code for rename files one time and pickup from folder

    Sure if you can, this why I post here if someone can help me in this issue, in the same time I try to find solution also

  10. #10
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: edit code for rename files one time and pickup from folder

    ok mazan,

    the last thing I read, and what i assume, is that the only issue for you left is the one regarding renaming. is that right? so....if that is true, here is the code I think you should use to get done what I think you want to get done. let me know how this works and if it does what I think you want to have it do:
    Please Login or Register  to view this content.
    as you can see, I commented out the following rows:
    Please Login or Register  to view this content.
    and the reason I did that is because those lines are your code. see the image below for proof that your renaming code works. now, can you take it from here? you didn't say exactly what was the issue with the renaming. so......does this help?
    Attached Images Attached Images

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Rename .pdf files in a folder
    By vijanand1279 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-11-2019, 01:11 AM
  2. Replies: 18
    Last Post: 11-27-2018, 05:25 AM
  3. [SOLVED] VB Code to rename the files in a folder
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2018, 09:53 PM
  4. rename files in folder
    By anilg0001 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2014, 08:22 AM
  5. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM
  6. [SOLVED] Rename Files in A folder
    By pradeepjassal in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-12-2012, 10:36 AM
  7. rename all files in a folder
    By DIBS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2006, 02:50 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1