ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to pass value between workbooks ? (https://www.excelbanter.com/excel-programming/283834-how-pass-value-between-workbooks.html)

Chanon

How to pass value between workbooks ?
 
I would like to pass value from cell A1 in workbook1, sheet1 to cell A2 in workbook2, sheet2 but not success. Could anyone give me the solution. Thank you very much.

Colo

How to pass value between workbooks ?
 
Hi Chanon,

Workbooks("Book2.xls").Sheets("Sheet1").Range("A1" ).Value = _
Workbooks("Book1.xls").Sheets("Sheet1").Range("A1" ).Value

You can pass value like this. :-)
--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Chanon" wrote in message
...
I would like to pass value from cell A1 in workbook1, sheet1 to cell A2 in

workbook2, sheet2 but not success. Could anyone give me the solution. Thank
you very much.


Chanon

ตอบ: How to pass value between workbooks ?
 
Hi, Col

I try many time for code like that you suggest me but it's not work. Error always shows " subscript out of range
Please anyone get me out another way for this solution. Thank you.

Colo

How to pass value between workbooks ?
 
Hi Chanon,

May I ask you a question? Both workbooks must be opened before use this
code.
How is your case?


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Chanon" wrote in message
...
Hi, Colo

I try many time for code like that you suggest me but it's not work.

Error always shows " subscript out of range "
Please anyone get me out another way for this solution. Thank you.




All times are GMT +1. The time now is 12:07 AM.

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