tbanov
11-14-2007, 12:13 PM
Hi,
Here's what I'm trying to do:
The user opens one workbook with a single worksheet that has a datepicker, a bunch of formatted cells and a button below somewhere. There's another workbook somewhere that contains several worksheets, all with the same format as the source workbook/sheet, but without the datepicker and button. When the button is clicked, the second workbook is to be accessed, data is to be pulled from a certain worksheet (which is determined by the value of the datepicker), and then it is to be pasted onto the user's workbook/sheet. The data I am interested in is in a specific range, and doesn't map perfectly due to the datepicker in the other workbook/sheet.
I have this all set up - the only thing I'm having trouble with is pulling the data. I know it's easy to just open the workbook and copy + paste, but I need to do this while keeping the user oblivious to where the data is coming from. My users are quite picky :P. I can't seem to find any info on how to do this.
I've tried recording a macro and running Data -> Import External Data -> Import Data, and I can specify the destination within the interface provided, but I cannot find any way in the code to specify the range of data that I am interested in.
Any suggestions?
Thanks for your time.
Here's what I'm trying to do:
The user opens one workbook with a single worksheet that has a datepicker, a bunch of formatted cells and a button below somewhere. There's another workbook somewhere that contains several worksheets, all with the same format as the source workbook/sheet, but without the datepicker and button. When the button is clicked, the second workbook is to be accessed, data is to be pulled from a certain worksheet (which is determined by the value of the datepicker), and then it is to be pasted onto the user's workbook/sheet. The data I am interested in is in a specific range, and doesn't map perfectly due to the datepicker in the other workbook/sheet.
I have this all set up - the only thing I'm having trouble with is pulling the data. I know it's easy to just open the workbook and copy + paste, but I need to do this while keeping the user oblivious to where the data is coming from. My users are quite picky :P. I can't seem to find any info on how to do this.
I've tried recording a macro and running Data -> Import External Data -> Import Data, and I can specify the destination within the interface provided, but I cannot find any way in the code to specify the range of data that I am interested in.
Any suggestions?
Thanks for your time.