The code posted at Post=8982 retrieves data from the worksheet assigned in the code from the active workbook.
If this code is to be changed so that it retrieves data from the worksheet "OrderData" in the workbook at location D:\Customer\Bills.xlsx
How may I do so?
Should it be same as at Post=19565
Any suggestion on this would be kindly appreciated.
Retrive Data from another workbook.
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Retrive Data from another workbook.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78527
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Retrive Data from another workbook.
Yes, you will have to open the Bills.xlsx workbook in order to retrieve data from it.
But be careful: the Worksheet_Change event will occur each time the user changes a cell, so opening and closing the workbook each time might have a noticeable negative effect on performance.
It might be better to keep the other workbook open.
But be careful: the Worksheet_Change event will occur each time the user changes a cell, so opening and closing the workbook each time might have a noticeable negative effect on performance.
It might be better to keep the other workbook open.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Retrive Data from another workbook.
Thanks for the reply Hans. I'll try to figure this out.
Best Regards,
Adam
Adam