Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to pass value in cell between workbooks ?

I'm tring to pass value in cell between workbooks for example : value in cell A1 of Book1.xls pass to cell B1 of Book2.xls
with code
workbooks(book1.xls").worksheets("sheet1").range(" A1").value = workbooks(book2.xls").worksheets("sheet1").range(" B1").value
or something like that but not success. Could anyone give me the answer please.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default How to pass value in cell between workbooks ?

Hi,

It seems you have a missing ( " ) in workbooks(book1.xls") & in
Workbooks("Book2.xls") that cause error.

If your book1.xls & book2.xls are saved workbook, use this code.

workbooks("book1.xls").worksheets("sheet1").range( "A1").value =
workbooks("book2.xls").worksheets("sheet1").range( "B1").value

But if you have created new Book1 & Book2 and not yet saved then use
workbook name without extension as under.

workbooks("book1").worksheets("sheet1").range("A1" ).value =
workbooks("book2").worksheets("sheet1").range("B1" ).value



Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I pass network logon name to a cell in a spreadsheet? Quality Plan Excel Worksheet Functions 5 December 4th 08 07:38 AM
Pass Cell Address to OFFSET ExcelGuy555 Excel Worksheet Functions 3 August 18th 07 07:42 AM
how to pass a cell as parameter for an external program? maxbell Excel Discussion (Misc queries) 1 February 8th 07 10:40 AM
How to pass values of a cell? Me Excel Discussion (Misc queries) 4 March 4th 05 05:35 PM
How to pass value between workbooks ? Chanon Excel Programming 3 November 29th 03 06:32 AM


All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"