Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help whit hyperlink

Hi !

In the range a1:a100 I have a list of song's title.
In range b1:b100 I have the file's name.

The question is how in VBA I can give this file name added to the dir name
as an hyperlink of the song title ?
So if I clik on that song it goes on playing.

I've tried something like that

dirname="c:\mySongs\"
for i=1 to 100
worksheets(sheet1).range("a1:a100").hyperlinks(i). Subaddress=dirname &
worksheets(sheet1).cell("b" & i)
next i

but it does not work

Thanks tou you

Didier


--

Retirer noPub
Take off noPub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default help whit hyperlink

Perhaps a DOUBLE click one liner would be of some help
right click sheet tabview codepaste thissave workbook.
assumes you are clicking on a cell with the full file name without .mp3 at
end
you will get C:\yourfolder\yourfilename.mp3
If you have .mp3 at the end, simply delete the &".mp3" part

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
ActiveWorkbook.FollowHyperlink Address:= _
"C:\yourfolder\" & ActiveCell & ".mp3"
End Sub

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"Didier Lizard" wrote in message
...
Hi !

In the range a1:a100 I have a list of song's title.
In range b1:b100 I have the file's name.

The question is how in VBA I can give this file name added to the dir name
as an hyperlink of the song title ?
So if I clik on that song it goes on playing.

I've tried something like that

dirname="c:\mySongs\"
for i=1 to 100
worksheets(sheet1).range("a1:a100").hyperlinks(i). Subaddress=dirname &
worksheets(sheet1).cell("b" & i)
next i

but it does not work

Thanks tou you

Didier


--

Retirer noPub
Take off noPub




Reply
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
background colour of sheet gone gray need to change to whit Change Background colour of worksheet Excel Worksheet Functions 1 April 22nd 10 11:08 PM
lock cell whit first value cferoiu Excel Worksheet Functions 5 May 30th 09 08:43 AM
excel remake whit shadow all the row where i am edit LuisJavier Excel Worksheet Functions 2 October 16th 06 03:40 AM
Sum of cells whit the same name Mark J Excel Worksheet Functions 2 January 23rd 06 04:55 PM
how do i count time numbers whit a negativ sign ( ex -19 hours, 25 rabbeer Excel Discussion (Misc queries) 1 June 29th 05 06:14 PM


All times are GMT +1. The time now is 12:40 AM.

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

About Us

"It's about Microsoft Excel"