PDA

View Full Version : Open Excel and select specific cells to populate text boxes



Kicker
12-28-2006, 09:23 PM
I have seen several items on this board that come close. But have not been able to "duplicate" what I need.

Here is what I want to do.

PPT with 1 or more slides to be used for the application.

Excel file with a small database (X number of rows with 5 columns)

at the click of a command button on the ppt slide, I want to populate 5 separate textboxes with the values of the 5 columns. Then, with the click of the command button again, go to the next record in the Excel file. I would like to just continue from there.

Ken Puls
12-29-2006, 09:37 AM
HI Kicker,

Conceptually, this is the way I'd approach this if it were an Access database:
-Make some kind of a hidden field in your presentation (or some other trick) to hold an index number
-Use ADO to connect to the database
-Leverage an ADO query to pull back a recordset
-Extract each element of the recordset to the correct powerpoint object

Now... you can use ADO to attach to an Excel worksheet, although I've never done it. I know Matt Vidas has though, as well as a couple of our other board members. One key I would mention is to make your connection to the database when your presentation opens, and close it when you close the presentation. Don't try to do it for each and every call, or you'll find the update very very slow.

I'm sure you'll be looking for specific help now, but thought I'd throw that out as a starting point. :)

Kicker
12-29-2006, 04:46 PM
Acually, I only have access to the Excel worksheets. Yeah, I know. However, I have thought about (and tried a little) putting a full screen userform in Excell and making it look like the presentation slide. It appears that it will work for me.
Thanks for your suggestion.