ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro (https://www.excelbanter.com/excel-programming/304975-macro.html)

joe

Macro
 
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

Dave Peterson[_3_]

Macro
 
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("b 1:c99").copy _
destination:=workbooks("book2.xls").worksheets("we ekend").range("b19")

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


Joe wrote:

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


--

Dave Peterson


SidBord

Macro
 
Do you mean you want to create a new Workbook, then
activate a specific sheet in it? Or does the Workbook
already exist?
-----Original Message-----
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
.


joe

Macro
 
Hi,

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

regards,
Joe
-----Original Message-----
Do you mean you want to create a new Workbook, then
activate a specific sheet in it? Or does the Workbook
already exist?
-----Original Message-----
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
.

.



All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com