Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Hyperlink macro - with filename

Dears;

I'm Trying to do a macro to do an hyperlink and I've done this, but in the
cell appears the path of the file hyperlinked and I would like to know what
should I do to display the filename instead of the path.

Can you help me?

Thanks to all!
--
atrep
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Hyperlink macro - with filename

This little macro will crate a hyperlink in cell B9. Only the filename will
be displayed and the not full filespec:

Sub hyperactive()
Set r = Range("B9")
s1 = """file:///c:\test\Data.xls"""
s2 = """Data.xls"""
MsgBox ("=HYPERLINK(" & s1 & "," & s2 & ")")
r.Formula = "=HYPERLINK(" & s1 & "," & s2 & ")"
End Sub

--
Gary''s Student - gsnu200825


"xavi garriga" wrote:

Dears;

I'm Trying to do a macro to do an hyperlink and I've done this, but in the
cell appears the path of the file hyperlinked and I would like to know what
should I do to display the filename instead of the path.

Can you help me?

Thanks to all!
--
atrep

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
Create hyperlink without filename? [email protected] Excel Worksheet Functions 4 April 20th 07 01:30 AM
Hyperlink using filename trimm54 Excel Worksheet Functions 2 February 15th 06 11:41 AM
Store hyperlink, when filename may have # in the name? Larry[_9_] Excel Programming 1 January 13th 06 11:43 PM
hyperlink filename # HAS Excel Discussion (Misc queries) 1 December 21st 05 04:07 PM
Macro to change filename of the Hyperlink maperalia Excel Programming 0 November 1st 05 11:59 PM


All times are GMT +1. The time now is 10:16 PM.

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"