Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default workaround for problem hyperlinks in Excel (doesn't work if pathcontains # character)

In Excel I am running into an issue when trying to create a hyperlink.
If the path contains the # character, Excel returns an error "Cannot
open the specified file" and does not open the folder. It seems the #
sign is the problem - paths with space, dash or single quotes work
fine:

WORKS: C:\temp\my path test
ERROR: C:\temp\my #path# test
WORKS: C:\temp\my -path- test
WORKS: C:\temp\my 'path' test

Here is a workaround for the problem. Instead, link to a vbscript that
opens the folder:

=HYPERLINK("File:///C:\temp\mypath1.vbs","my #path# test")

where the mypath1.vbs file contains:

Option Explicit
Dim Shell, wsh
Set wsh = WScript.CreateObject ("WScript.Shell")
Set Shell = WScript.CreateObject ("Shell.Application")
Shell.Open "C:\temp\my #path# test"
WScript.Quit()

The only pain is that when you click the hyperlink, Windows asks
"would you like to open this file?" and you have to click Yes.

If anyone has any other suggestions let me know.

---------------------------------


Dave Peterson
View profile
More options Jan 7 2006, 2:25 pm
Newsgroups: microsoft.public.excel.misc
From: Dave Peterson
Date: Sat, 07 Jan 2006 13:25:56 -0600
Local: Sat, Jan 7 2006 2:25 pm
Subject: hyperlink navigation path path wrong in Excel 2003
Reply to author | Forward | Print | Individual message | Show original
| Report this message | Find messages by this author
I don't have a guess about the HTM saving and reopening, but you can
use:

=hyperlink("File:////c:/mypicts/mypict.jpg","Click me")

Did you select the cell and Insert|hyperlink and verify the address?

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
Nested If workaround - How does it work for other cells dynamicall Rajula Excel Discussion (Misc queries) 12 April 21st 06 04:50 PM
hyperlinks in excel don't work comfuted Excel Discussion (Misc queries) 0 March 1st 06 07:21 PM
hyperlinks between excel and work when e-mailing Suzanne Excel Discussion (Misc queries) 0 November 30th 05 06:17 PM
Office 97 hyperlinks do not work in excel 2003 RonanM Excel Discussion (Misc queries) 0 October 26th 05 03:03 PM
How do I get hyperlinks, from previous version of excel, to work . jeffreymiller1966 Excel Discussion (Misc queries) 0 March 25th 05 03:17 PM


All times are GMT +1. The time now is 03:33 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"