Open your Menu Editor. I'm using a Bookmark system as an example, you can add URL's to your menu then open Internet Explorer straight to that page. Adapt it as you wish.
Set up this in your Menu Editor, the Indexes are what you need to add:
Bookmark (name= mnuBookmarkTop)
...Add a Bookmark (name = mnuBookmark, Index = 0
...Launch Internet Explorer (name = mnuBookmark, Index = 1)
...- (name = mnuBookmark, Index = 2)
The names are the same, so it's a control array. Now to add the items. I used an InputBox here. The user enters the URL, and it appears on the menu under the last item. They can then click it to open IE to that page. Here's the code:
[tt]Private Sub mnuBookmark_Click(Index As Integer)
Dim Bookmark As String
Dim I As Integer
Select Case Index
Case 0:
[color green] 'Display the InputBox for the user to enter the URL[/color]
Bookmark = InputBox("Enter the URL to Bookmark", "Bookmark a website")
[color green] 'Get the next available index in the menu[/color]
Load mnuBookmark(mnuBookmark.ubound + 1)
[color green] 'Write the Caption of the new item as the URL[/color]
mnuBookmark(mnuBookmark.ubound).Caption = Bookmark
Case 1:
Shell ("C:\Program Files\Internet Explorer\IExplore www.google.com"), vbMaximizedFocus
Case Else
Shell ("C:\Program Files\Internet Explorer\IExplore " & mnuBookmark(Index).Caption), vbMaximizedFocus
End Select
End Sub[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.