Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

For Each workbook in Folder A Copy Values & Format of  each Sheet2...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
u473 - 29 May 2008 01:50 GMT
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
Norman Jones - 29 May 2008 02:08 GMT
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

> For each workbook in Folder A
>      Copy  Values & Format (not formulas) of every Sheet2
[quoted text clipped - 3 lines]
> Help appreciated.
> Celeste
u473 - 29 May 2008 11:04 GMT
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
Norman Jones - 29 May 2008 11:32 GMT
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
> 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
u473 - 29 May 2008 14:53 GMT
thank you Norman, this is what I was after.
Celeste.
Ron de Bruin - 29 May 2008 16:13 GMT
Hi Norman

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

Signature

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

> Hi Celeste,
>
[quoted text clipped - 27 lines]
>> Can it be done in one sterp in VBA ?
>> Have a good day, Celeste
Norman Jones - 29 May 2008 16:24 GMT
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
Ron de Bruin - 29 May 2008 16:32 GMT
>      "Open files with a variable name in a folder get name"

I will read the thread this evening Norman

Signature

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

> Hi Ron,
>
[quoted text clipped - 16 lines]
> Regards.
> Norman
Ron de Bruin - 29 May 2008 17:59 GMT
Add it to the Tip section
http://www.rondebruin.nl/copy3.htm

Signature

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

> Hi Norman
>
[quoted text clipped - 32 lines]
>>> Can it be done in one sterp in VBA ?
>>> Have a good day, Celeste
u473 - 30 May 2008 01:45 GMT
Wooowww!!!
Thank you for your help.
I am happy to find that my question contributed to extend your
"Bible".
Have a good day,
Celeste
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.