Consulting

Results 1 to 3 of 3

Thread: Open Excel and select specific cells to populate text boxes

  1. #1

    Open Excel and select specific cells to populate text boxes

    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.
    ttfn

    Kicker

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    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.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  3. #3
    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.
    ttfn

    Kicker

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •