View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
choice[_2_] choice[_2_] is offline
external usenet poster
 
Posts: 84
Default different workbooks

WORKED...thank you

Next question has a couple parts.
so i have,
Set destSheet = Workbooks("data.xls").Worksheets("data")
Set sourceSheet = Workbooks("register.xls").Worksheets("register")
DestSheet.Range("a1:a10").Value = sourceSheet.Range("a1:a10").Value

but on destsheet...how can i make it go to the bottom of the entries instead
of a set range.
i have: cells(rows.count,1).End(xlup)(2).Select, but im not sure how to
incorporate both.

next part of question, how can i make data.xls hidden? and if so...can it be
shared?

thank you in advance

"Patrick Molloy" wrote:

Set destSheet = Workbooks("data.xls").Worksheets("data")
Set sourceSheet = Workbooks("register.xls").Worksheets("register")
DestSheet.Range("a1:a10").Value = sourceSheet.Range("a1:a10").Value

--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"choice" wrote in message
...
i have :

Sub inputdata()

Set destSheet = Worksheet("data")
Set sourceSheet = Worksheet("register")
Workbooks("data.xls").Activate
DestSheet(Range("a1:a10")).Value =
sourceSheet(Range("a1:a10")).Value


my question/problem is that destsheet and sourcesheet are in different
workbooks...how would i add that in my code? i tried some stuff but
couldnt
get it
the 2 workbooks are data.xls and register.xls
thanks in advance