Macro

J

Joe

Hi,

I have managed to use VBA to copy the range cell from
worksheet:"week" and paste it to worksheet:"weekend" in
the same workbook using the button.Th same applies to
worksheet:"day" to worksheet:"weekend" after the pasting
of the data from worksheet:"week".

How can I actually activate a new workbook and paste data
from worksheet:"week" and worksheet:"day" or any
particular worksheets that needed?

Thanks
regards,
Joe
 
D

Dave Peterson

You don't need to active a worksheet to paste into it.

For example:

worksheets("week").range("b1:c99").copy _
destination:=worksheets("weekend").range("b19")

and if you want to go between workbooks:

workbooks("book1.xls").worksheets("week").range("b1:c99").copy _
destination:=workbooks("book2.xls").worksheets("weekend").range("b19")

If this doesn't help, you could post a little more info.
 
S

SidBord

Do you mean you want to create a new Workbook, then
activate a specific sheet in it? Or does the Workbook
already exist?
 
J

Joe

Hi,

it is to activate a new worksheetin new workbook upon
pressing the button.

regards,
Joe
 
Top