Discussion Locked

Excel Database Query Function

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a workbook setup to query other excel files to populate a worksheet. I am wondering if there is a way to prompt for the filename to do the query? I have an automated report that runs every day with the date as part of the filename, so the previous days data does not get overwritten. I am wanting to be prompted for the filename on the database query when the workbook is opened and refreshes the data, that way I can look at a specific days data.

Thanks

6 replies

by peyison

I can tell you how to do this using VBA. Before I type it all out, I wanted to check to see if you'd be interested in a VBA approach. I don't know of another way to do this.

by dgbaum

I was wanting it to be contained all within Excel. I am going to have other people interacting with the spreadsheet to pull information for reports, needs to be as simple as possible. May need to look at it from a different angle.

Thanks

by dgbaum

I don't think I want to go quite as far as VB right now, but thanks for the info.

by peyison

Actually you can do it with VBA - from within Excel. The code would be contained in the workbook. Let me know if you're interested.

by dgbaum

If it can be contained within the workbook, then that is what I am looking for, I am wanting to keep this report as simple as possible for the user. You can send the info to dougg@tmi-us.com

Thanks
Doug

This discussion is closed to new replies.