View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Activation inheritance

Nick & Bob have explained about Activate. It's not clear what you are trying
to do other than you mention Copy/Paste. For that you don't need select or
activate -

rngSource.Copy rngDest

Set the two ranges as required, qualifying them back to the appropriate
workbook and sheet.

If the two ranges are not same size at least one should refer to a single
cell.

Regards,
Peter T

"Mats Samson" wrote in message
...
I'm a little bit confused that the following does not seem to be valid.
Copy from another active Workbook and
Workbooks("A").Worksheets("B"). Range("Goal"). Activate
Paste....
If Worksheets("A") was the active sheet before switching to another WB

then
the code returns to the A-sheet and give me the error 1004 as it cannot

find
the
range "Goal" in this sheet.

Is it really necessary to acivate each part individually?
Workbooks("A").Activate
Worksheets("B").Activate
Range("Goal"). Activate

Why? It doesn't seem to be logic!