Combo Boxes as Hyper Links

  • Thread starter Thread starter Rodney
  • Start date Start date
Try this:

On a new slide, insert a command button, a listbox and a combobox.
View | Toolbars | Control Toolbar

Insert the code so that it looks like this:

================================
Option Explicit

Private Sub ComboBox1_Change()
' If there is something in the selection, try to go there
If Len(ComboBox1.Value) > 3 Then
ActivePresentation.FollowHyperlink _
Address:="http://" & ComboBox1.Value, _
NewWindow:=True, AddHistory:=True
End If
End Sub

Private Sub CommandButton1_Click()
'Clear lists
ComboBox1.Clear
ListBox1.Clear

'Load Lists
With ComboBox1
.AddItem "www.yahoo.com"
.AddItem "www.pptfaq.com"
.AddItem "www.microsoft.com"
End With
With ListBox1
.AddItem "www.yahoo.com"
.AddItem "www.pptfaq.com"
.AddItem "www.microsoft.com"
End With
End Sub

Private Sub ListBox1_DblClick()
ActivePresentation.FollowHyperlink _
Address:="http://" & ListBox1.Value, _
NewWindow:=True, AddHistory:=True
End Sub

====================

The command button loads both the combobox and the listbox. Either
selecting from the combobox or double clicking on an item in the listbox
will take you to the listed website. Post back if this helps or if we might
help you further.

B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top