Drop down menus in Power Point

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gomez
    New Member
    • Jul 2007
    • 4

    Drop down menus in Power Point

    Hi, I'm Gomez and I am NOT a programmer - I am just a lowly graphic designer so please take pity on me and try not to laugh at what I'm about to ask.

    I am building a multi channel presentation in Power Point that will be distributed on CD. The self starting presentation links to other PPTs, videos, PDFs, etc and what I am trying to do is avoid having a cluttered menu screen or multiple layers of menus by using drop down menus.

    The option to add them is available as an additional tool bar item but you have to know Visual Basic in order to make them work. I can write HTML and a little Java but that's it.

    Can anybody help me to figure out how to make these things work?
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Gomez. Welcome to TSDN!

    Sounds like you'd want to use a select element, coupled with an eensy bit of JavaScript:

    [code=html]
    <script type="text/javascript">
    // <![CDATA[
    function setPPT(uri)
    {
    if(uri != '')
    {
    location.href = uri;
    }
    }
    // ]]>
    </script>

    <select onchange="setPP T(this.options[this.selectedIn dex].value);">
    <option value="">Select a PPT file to get started!</option>
    <option value="circles. ppt">Circles</option>
    <option value="squares. ppt">Squares</option>
    <option value="diamond. ppt">Niel Diamond</option>
    .
    .
    .
    </select>
    [/code]

    What you're doing here is presenting a drop-down menu to the User, and whenever he makes a selection, you call the the setPPT() function, which simply sets the location to whatever is selected.

    We have to make one simple case check just in case the User tries to select the "Select a PPT file to get started!" option, since that entry doesn't actually represent a valid PPT file. That is why we check to make sure that uri != '' in setPPT().

    Comment

    • Gomez
      New Member
      • Jul 2007
      • 4

      #3
      So this is what I get but it's not working on the PPT slide.

      Private Sub ComboBox1_Chang e()
      <script type="text/javascript">
      // <![CDATA[
      Function setPPT(uri)
      {
      if(uri != '')
      {
      location.href = uri;
      }
      }
      // ]]>
      </script>

      <select onchange="setPP T(this.options[this.selectedIn dex].value);">
      <option value="">Select a PPT file to get started!</option>
      <option value="circles. ppt">Circles</option>
      <option value="squares. ppt">Squares</option>
      <option value="diamond. ppt">Niel Diamond</option>
      .
      .
      .
      </select>
      End Function







      Originally posted by pbmods
      Heya, Gomez. Welcome to TSDN!

      Sounds like you'd want to use a select element, coupled with an eensy bit of JavaScript:

      [code=html]
      <script type="text/javascript">
      // <![CDATA[
      function setPPT(uri)
      {
      if(uri != '')
      {
      location.href = uri;
      }
      }
      // ]]>
      </script>

      <select onchange="setPP T(this.options[this.selectedIn dex].value);">
      <option value="">Select a PPT file to get started!</option>
      <option value="circles. ppt">Circles</option>
      <option value="squares. ppt">Squares</option>
      <option value="diamond. ppt">Niel Diamond</option>
      .
      .
      .
      </select>
      [/code]

      What you're doing here is presenting a drop-down menu to the User, and whenever he makes a selection, you call the the setPPT() function, which simply sets the location to whatever is selected.

      We have to make one simple case check just in case the User tries to select the "Select a PPT file to get started!" option, since that entry doesn't actually represent a valid PPT file. That is why we check to make sure that uri != '' in setPPT().

      Comment

      • Gomez
        New Member
        • Jul 2007
        • 4

        #4
        pbmods,

        I forgot to say thank you!

        I C/P the spcipt into the Visula Basic window between the tags,

        Private Sub ComboBox1_Chang e()

        End Function

        Comment

        • Gomez
          New Member
          • Jul 2007
          • 4

          #5
          pbmods,

          I forgot to say thank you!

          I C/P the spcipt into the Visula Basic window between the tags,

          Private Sub ComboBox1_Chang e()

          End Function

          and expected to see the menu giving me some drop options...but it don't. What did I do wrong with it?

          Comment

          Working...