LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listbox selection follows hyperlink


Hi all,

I've created a form (with much needed help from those in this forum),
which displays a listbox listing data in 3 columns - A2:C35 in
sheets("DATA"). In Sheets("DATA") column J2:J35, I have a hyperlink
created from the data listed in columns A2:C35. My ultimate goal is to
be able to click on a row in my listbox in userform1 and press a command
button on the form that will open netscape and follow the hyperlink.
Here's what I have so far... Can anyone point me in the right direction
? Thanks so much for your time.

Private Sub CommandButton2_Click()
Dim sPath As String
Dim sURL As String
Dim dTaskID As Double
Dim i As Long
Dim txt As Control
i = Me.ListBox1.ListIndex + 2
sURL = Me.ListBox1.Value
Me.ListBox1.Value = Sheets("DATA").cells(i, 7).Value

sPath = "C:\Program Files\Netscape\Communicator\Program\netscape.exe"
'my browser

dTaskID = Shell(sPath & " " & sURL, vbNormalFocus)

If dTaskID = 0 Then
MsgBox "Could not open browser"
End If
End Sub

Oreg


--
Oreg
------------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=477391

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox selection ub Excel Discussion (Misc queries) 0 March 10th 09 06:43 PM
Listbox & Selection sparx Excel Discussion (Misc queries) 0 July 31st 06 10:48 PM
Listbox Selection Todd Huttenstine Excel Programming 1 December 9th 04 08:37 PM
ListBox selection GMet Excel Programming 1 September 24th 04 08:02 PM
Listbox multi selection Jorge Rodrigues Excel Programming 3 September 7th 04 11:06 PM


All times are GMT +1. The time now is 05:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"