ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Executing code with opening target workbook (https://www.excelbanter.com/excel-programming/286231-executing-code-opening-target-workbook.html)

Todd Huttenstine[_3_]

Executing code with opening target workbook
 
The below working code copys cells from an open workbook and then opens the
target workbook and pastes the copied cells as links from the other
workbook. How can I make the below operation work without having to
actually open the target workbook located in "Workbooks.Open
Worksheets(4).Range("A6").Value"


Workbooks.Open Worksheets(4).Range("A6").Value
Range("A1").Select
ActiveSheet.Paste Link:=True


Thank you

Todd Huttenstine




Tom Ogilvy

Executing code with opening target workbook
 
don't believe you can.

--
Regards,
Tom Ogilvy

Todd Huttenstine wrote in message
...
The below working code copys cells from an open workbook and then opens

the
target workbook and pastes the copied cells as links from the other
workbook. How can I make the below operation work without having to
actually open the target workbook located in "Workbooks.Open
Worksheets(4).Range("A6").Value"


Workbooks.Open Worksheets(4).Range("A6").Value
Range("A1").Select
ActiveSheet.Paste Link:=True


Thank you

Todd Huttenstine







All times are GMT +1. The time now is 04:42 PM.

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