PC Review


Reply
Thread Tools Rate Thread

Copy All Workbooks Sheets(2) Formats & Values only from Folder A toFolder B

 
 
u473
Guest
Posts: n/a
 
      14th Aug 2008
I tried to adapt Ron de Bruin's code in Copy_Folder(), but I fumbled.
Here is my pseudo-Code :

Prompt for SourceFolder path
Prompt for DestinationFolder Path

If DestinationFolder Does not exist, Create it

For Each workbook in SourceFolder

Copy worksheet(2) values & formats only 'Sheet 2 only, No
formulas, Calculations or Filtering
to DestinationFolder, same original SourceWorkbook.name
Next Workbook

Syntax wise, How do I switch back & forth in my loop from the
SourceFolder Workbooks.Sheets(2) to the DestinationFolder ?

Thank you for your help,

Wayne
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      14th Aug 2008
I think this will do what you want:
http://www.rondebruin.nl/folder.htm

Regards,
Ryan---

--
RyGuy


"u473" wrote:

> I tried to adapt Ron de Bruin's code in Copy_Folder(), but I fumbled.
> Here is my pseudo-Code :
>
> Prompt for SourceFolder path
> Prompt for DestinationFolder Path
>
> If DestinationFolder Does not exist, Create it
>
> For Each workbook in SourceFolder
>
> Copy worksheet(2) values & formats only 'Sheet 2 only, No
> formulas, Calculations or Filtering
> to DestinationFolder, same original SourceWorkbook.name
> Next Workbook
>
> Syntax wise, How do I switch back & forth in my loop from the
> SourceFolder Workbooks.Sheets(2) to the DestinationFolder ?
>
> Thank you for your help,
>
> Wayne
>

 
Reply With Quote
 
u473
Guest
Posts: n/a
 
      14th Aug 2008
Thank you for your answer, but this is exactly the module
CopyFolder(), I have tried to adapt from.
How do I loop and copy from the Active Sourcefolder,
ActiveWorkbook.worksheets(2).copy Formats & Values.

From his other examples, I could have :

For Each FileInFromFolder In FSO.getfolder(FromPath).files
workbooks.worksheets(2).cells.copy PasteSpecial xlPasteValues
PasteSpecial xlPaste Formats Destination := ToPath
Application.CutCopymode = False
NextFileInFromFolder

Of course this is this For Each block I have trouble with.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Paste Values & Formats from each Sheet & Book in Folder A to B. u473 Microsoft Excel Programming 0 25th Nov 2007 02:25 PM
linking values and formats on from different sheets =?Utf-8?B?Umljaw==?= Microsoft Excel Worksheet Functions 3 31st Aug 2007 06:56 AM
How to copy the work sheets from different workbooks into one? =?Utf-8?B?U2VzaA==?= Microsoft Excel Misc 1 15th Apr 2005 06:03 PM
Copy with link between sheets - all the formats dissapear?!? =?Utf-8?B?S2F0aHJpbmU=?= Microsoft Excel Misc 1 4th Feb 2005 03:45 PM
Array Sheets Copy to new Workbooks Witek Kruk Microsoft Excel Programming 2 18th Oct 2004 01:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 AM.