ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help importing data from a closed workbook (https://www.excelbanter.com/excel-programming/338779-help-importing-data-closed-workbook.html)

Elvis The King

Help importing data from a closed workbook
 
Hello,

For the past several years we've been using a worksheet to do our customer
quotes. I thought I'd be really slick (I'm now finding out that I'm not near
as slick as I thought I was) if I could copy the customer information from a
saved workbook into the current workbook.

I would like to have a command button that would get an open file dialog box
or maybe run a macro where the user can select which quote to import the
customer data from. All of the quotes have a different name and they reside
in different directories. The customer data however is always in the same
cells. For example: Customer Name is always in B5, Customer Phone Number is
always in C8 etc.

I am quite the novice at VBA and have had number of failed attempts. I would
truly appreciate anybody that can offer an example of how this can be done.

Thanks in advance,

Todd




PY & Associates[_4_]

Help importing data from a closed workbook
 
Use getopenfilename method to display files to pick
open the picked file
import data
close the data file
if necessary, loop again for another file


"Elvis The King" wrote:

Hello,

For the past several years we've been using a worksheet to do our customer
quotes. I thought I'd be really slick (I'm now finding out that I'm not near
as slick as I thought I was) if I could copy the customer information from a
saved workbook into the current workbook.

I would like to have a command button that would get an open file dialog box
or maybe run a macro where the user can select which quote to import the
customer data from. All of the quotes have a different name and they reside
in different directories. The customer data however is always in the same
cells. For example: Customer Name is always in B5, Customer Phone Number is
always in C8 etc.

I am quite the novice at VBA and have had number of failed attempts. I would
truly appreciate anybody that can offer an example of how this can be done.

Thanks in advance,

Todd






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

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