Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy/pasting between 2 workbooks...

Hi there,
Thank you very much for the very quick reply.
I probably should have let you know that I also had the worksheets
named.

Down below your example is my feeble attempt using the VBA recorder to
show you what I was trying to accomplish.
My code works fine until I save the two workbooks out to differently
named workbooks.

Again, thanks for your input.
Joe.


Dim sFile As String

sFile = Format(Date, "dddmmddyy")
Workbooks("Tracking-" &
sFile).Worksheets(1).Range("A1:A100").CopyWorkbook s("CallResults-" &
sFile).Worksheets(1).Range("a1:a100").PasteSpecial Paste:=xlValues


' Original Problem.
' The code below works fine............until..........I copy the
workbooks to a new name.
' Example:
' SourceFile.xls is saved out to SourceFileCopiedOnce.xls
' and
' DestinationFile.xls is saved out to
DestinationFileCopiedOnce.xls.
' I understand that I've hardcoded the original workbook names in the
code below and that those references
' don't update respectively when doing a "Save As" to a different named
workbook.




' Range("A1").Select
' ActiveCell.FormulaR1C1 = "Start here"
' Range("B4:B13").Select
' Selection.Copy
' Windows("DestinationFile.xls").Activate
' Range("B4").Select
' Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
' False, Transpose:=False
' Range("A1").Select
' Windows("SourceFile.xls").Activate
' Range("A2").Select
' Application.CutCopyMode = False
' ActiveCell.FormulaR1C1 = "Stop here"
' Range("A3").Select
End Sub


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
macro for copy-pasting from different workbooks Binty Excel Worksheet Functions 1 November 25th 08 03:29 PM
Pasting a formula in many different workbooks Playa Excel Discussion (Misc queries) 3 July 18th 06 05:57 PM
Copying and Pasting between Workbooks NothingButRomance Excel Worksheet Functions 0 May 13th 05 09:54 PM
Copying and Pasting between Workbooks NothingButRomance Excel Worksheet Functions 0 May 13th 05 07:33 PM
Copy/pasting between 2 workbooks... Bob Phillips[_5_] Excel Programming 0 July 23rd 03 09:21 PM


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