+ Reply to Thread
Results 1 to 5 of 5

Moving file between folders error (FSO)

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Moving file between folders error (FSO)

    Hi

    I am having a bit of trouble with the below code. basically, I want it to move the open workbook from one folder to another. I probably need to add a activeworkbook.close before I can move it, but I'm not sure where.

    any help would be appreciated.

    Many thanks in advance

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,344

    Re: Moving file between folders error (FSO)

    I probably need to add a activeworkbook.close before I can move it,
    Yep, I guess. Otherwise Windows is going to say the file is in use.


    but I'm not sure where.
    when you've finished doing whatever you need to do to it and before you try to move it ...


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Moving file between folders error (FSO)

    Thank you, can you help me with the code though? I'd like it to get to the stage where it says 'file in use'. I think this is where it is throwing up the error

    Please Login or Register  to view this content.
    Thanks again.

  4. #4
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Moving file between folders error (FSO)

    is there anyone who can help me with this, please?

    Thanks in advance

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,344

    Re: Moving file between folders error (FSO)

    I think it would look something like this but I can't test it it because I don't have workbook(s), forms command buttons, etc.

    Please Login or Register  to view this content.

    Like I said: after you've finished doing what you need to do to it and before you try to move it.


    Regards, TMS

+ 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. VBA code to open folders and pdf file inside the folders
    By kirtesh250187 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2013, 03:17 AM
  2. Replies: 0
    Last Post: 04-15-2013, 06:54 AM
  3. VBA code for searching file through folders and sub folders
    By vikas189 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2012, 06:00 PM
  4. Moving workbooks between folders
    By Ozzie in forum Excel General
    Replies: 3
    Last Post: 01-25-2006, 05:30 AM
  5. [SOLVED] Stop directory & folders changing in link when moving file
    By - Bella in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2005, 12:05 PM

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