How to pass value between workbooks ?

G

Guest

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.
 
C

Colo

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/colo/CellMastersLink.htm
mailto:[email protected]

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


Chanon said:
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.
 
G

Guest

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.
 
C

Colo

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/colo/CellMastersLink.htm
mailto:[email protected]

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


Chanon said:
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 "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top