Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ozzie
 
Posts: n/a
Default Moving workbooks between folders

I have a problem in that I currently run a macro that opens all the workbooks
in a particular folder, and merges the data onto one new worksheet, which
works fine.

However I need to add a bit of code that will move the original workbook into
a new folder called say 'archive' so that the original folder is now empty
and the archive folder is populated??

anyone have any idea's?, anything appreciated

Cheers, David
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default Moving workbooks between folders

Hi Ozzie

Why not give it a new name and add a new folder when you are ready

Name "C:\Data\" As "C:\Data " & Format(Now, "dd-mm-yy h-mm-ss") & "\"
MkDir "C:\Data\"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ozzie" <u18021@uwe wrote in message news:5ad7ac35d415c@uwe...
I have a problem in that I currently run a macro that opens all the workbooks
in a particular folder, and merges the data onto one new worksheet, which
works fine.

However I need to add a bit of code that will move the original workbook into
a new folder called say 'archive' so that the original folder is now empty
and the archive folder is populated??

anyone have any idea's?, anything appreciated

Cheers, David



  #3   Report Post  
Posted to microsoft.public.excel.misc
bigwheel
 
Posts: n/a
Default Moving workbooks between folders

Something along these lines presumably:-

Sub MoveAFile()
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFile "C:\testfile.txt", "C:\winnt\testfile.txt"
End Sub

"Ozzie" wrote:

I have a problem in that I currently run a macro that opens all the workbooks
in a particular folder, and merges the data onto one new worksheet, which
works fine.

However I need to add a bit of code that will move the original workbook into
a new folder called say 'archive' so that the original folder is now empty
and the archive folder is populated??

anyone have any idea's?, anything appreciated

Cheers, David

  #4   Report Post  
Posted to microsoft.public.excel.misc
david giles via OfficeKB.com
 
Posts: n/a
Default Moving workbooks between folders

Ron,

Many thanks for your response and for the others, I tried both answers but
your won, it works a treat, thanks again


Ron de Bruin wrote:
Hi Ozzie

Why not give it a new name and add a new folder when you are ready

Name "C:\Data\" As "C:\Data " & Format(Now, "dd-mm-yy h-mm-ss") & "\"
MkDir "C:\Data\"

I have a problem in that I currently run a macro that opens all the workbooks
in a particular folder, and merges the data onto one new worksheet, which

[quoted text clipped - 7 lines]

Cheers, David


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200601/1
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
moving workbooks kmd Excel Discussion (Misc queries) 1 October 26th 05 12:21 AM
Links auto update on some workbooks but not others Tasza Excel Worksheet Functions 1 October 25th 05 01:04 AM
linked workbooks in different folders... Mark Scholl Links and Linking in Excel 1 April 1st 05 07:21 AM
Moving sheets between workbooks [email protected] Excel Discussion (Misc queries) 3 December 27th 04 07:14 PM
Workbooks...I'll try this again... Markster Excel Discussion (Misc queries) 10 December 7th 04 10:12 PM


All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"