View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Copying data between workbooks

Yes you can copy cells between workbooks. It will be something like this
(untested but this should be close)...

dim rngCopyFrom as range
Dim wbkCopyTo as workbook
dim rngCopyTo as Range

on error resume next
set wbkCopyto = workbooks("MyFile.xls")
if wbkcopyto is nothing then
set wbkcopyto = workbooks.open("C:\MyFile.xls")
on error goto 0
if wbkcopyto is nothing then
msgbox "Sorry... Can't find the destination file."
else
set rngcopyfrom = thisworkbook.sheets("Sheet1").Range("A1")
set rngcopyto = wbkcopyto.Sheets("Sheet1").Range("A1")

rngcopyto.value = rngcopyfrom.value
wbkcopyto.close
--
HTH...

Jim Thomlinson


"Karen53" wrote:

Hi,

I thought I'd seen posts on this while looking for other information but now
I need them they are not coming up on any of my searches.

Can I copy cells from a sheet in one workbook into a sheet in another
workbook, but not as a link, the actual value?
--
Thanks for your help.
Karen53