Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default For Each workbook in Folder A Copy Values & Format of each Sheet2...

For each workbook in Folder A
Copy Values & Format (not formulas) of every Sheet2
to Folder B new workbook, Sheet2 (same workbook name from Folder
A)
Next
Help appreciated.
Celeste
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default For Each workbook in Folder A Copy Values & Format of each Sheet2...

Hi Celeste,

See Ron de Bruin's sample code at:

Merge data from all workbooks in a folder (1)
http://www.rondebruin.nl/copy3.htm

and

Merge data from all workbooks in a folder (2)
http://www.rondebruin.nl/fso.htm


See also Ron's RDBMerge Add-in:

Merge data from all workbooks in a folder
http://www.rondebruin.nl/merge.htm



---
Regards.
Norman


"u473" wrote in message
...
For each workbook in Folder A
Copy Values & Format (not formulas) of every Sheet2
to Folder B new workbook, Sheet2 (same workbook name from Folder
A)
Next
Help appreciated.
Celeste


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default For Each workbook in Folder A Copy Values & Format of eachSheet2...

Thank you for the tip but I was looking beyond that.
In Excel if you want to copy Values & Formats, as far as I now, you
have to do it in 2 steps.
Can it be done in one sterp in VBA ?
Have a good day, Celeste
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default For Each workbook in Folder A Copy Values & Format of each Sheet2...

Hi Celeste,

If you look at other examples, you will see
that Ron provides the optional ability to copy
values and formats.

However, try changing an instruv=ction like:

destrange.Value = sourceRange.Value

to:

sourceRange.Copy
With destrange
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
Application.CutCopyMode = False
End With

or, perhaps:

sourceRange.Copy Destination:=destrange.



---
Regards.
Norman
"u473" wrote in message
...
Thank you for the tip but I was looking beyond that.
In Excel if you want to copy Values & Formats, as far as I now, you
have to do it in 2 steps.
Can it be done in one sterp in VBA ?
Have a good day, Celeste


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default For Each workbook in Folder A Copy Values & Format of eachSheet2...

thank you Norman, this is what I was after.
Celeste.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default For Each workbook in Folder A Copy Values & Format of each Sheet2...

Hi Norman

After I update the page I forget to add this I see now
Will add it to the page this evening



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Norman Jones" wrote in message ...
Hi Celeste,

If you look at other examples, you will see
that Ron provides the optional ability to copy
values and formats.

However, try changing an instruv=ction like:

destrange.Value = sourceRange.Value

to:

sourceRange.Copy
With destrange
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
Application.CutCopyMode = False
End With

or, perhaps:

sourceRange.Copy Destination:=destrange.



---
Regards.
Norman
"u473" wrote in message
...
Thank you for the tip but I was looking beyond that.
In Excel if you want to copy Values & Formats, as far as I now, you
have to do it in 2 steps.
Can it be done in one sterp in VBA ?
Have a good day, Celeste


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default [OT] For Each workbook in Folder A Copy Values & Format of each Sheet2...

Hi Ron,

After I update the page I forget to add this I see now
Will add it to the page this evening


Excellent!


[OT]

BTW: Vis-a-vis the thead

"Open files with a variable name in a folder get name"

are you aware of any reason for JW's
GetValue function not to work on a
network file?


---
Regards.
Norman
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default [OT] For Each workbook in Folder A Copy Values & Format of each Sheet2...

"Open files with a variable name in a folder get name"

I will read the thread this evening Norman


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Norman Jones" wrote in message ...
Hi Ron,

After I update the page I forget to add this I see now
Will add it to the page this evening


Excellent!


[OT]

BTW: Vis-a-vis the thead

"Open files with a variable name in a folder get name"

are you aware of any reason for JW's
GetValue function not to work on a
network file?


---
Regards.
Norman

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default For Each workbook in Folder A Copy Values & Format of each Sheet2...

Add it to the Tip section
http://www.rondebruin.nl/copy3.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
Hi Norman

After I update the page I forget to add this I see now
Will add it to the page this evening



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Norman Jones" wrote in message ...
Hi Celeste,

If you look at other examples, you will see
that Ron provides the optional ability to copy
values and formats.

However, try changing an instruv=ction like:

destrange.Value = sourceRange.Value

to:

sourceRange.Copy
With destrange
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
Application.CutCopyMode = False
End With

or, perhaps:

sourceRange.Copy Destination:=destrange.



---
Regards.
Norman
"u473" wrote in message
...
Thank you for the tip but I was looking beyond that.
In Excel if you want to copy Values & Formats, as far as I now, you
have to do it in 2 steps.
Can it be done in one sterp in VBA ?
Have a good day, Celeste


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default For Each workbook in Folder A Copy Values & Format of eachSheet2...

Wooowww!!!
Thank you for your help.
I am happy to find that my question contributed to extend your
"Bible".
Have a good day,
Celeste
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
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
Cut & Paste Excel Format & Values to New Folder in PdF u473 Excel Programming 0 November 15th 07 01:14 AM
How to copy a sheet from a workbook to another in different folder kurt Excel Programming 1 October 31st 05 07:58 PM
Copy values from Sheet1 to Sheet2 Eintsein_mc2 Excel Discussion (Misc queries) 1 January 6th 05 05:02 AM
Copy values only, sheet1 to sheet2 without Selection Robert Christie[_3_] Excel Programming 4 October 20th 04 02:05 PM


All times are GMT +1. The time now is 09:55 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"