Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Hyperlink Error in Excel when using #

Hi there!

I've been working on a macro in Excel that creates hyperlinks to files in a
folder. The macro works fine, but I found that Excel can't manage hyperlinks
when the folder name begins with"#" and it's located in the root directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that
character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.

THX in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink Error in Excel when using #

The only fix I know is to stop using # in file names.



CerealKiller wrote:

Hi there!

I've been working on a macro in Excel that creates hyperlinks to files in a
folder. The macro works fine, but I found that Excel can't manage hyperlinks
when the folder name begins with"#" and it's located in the root directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that
character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.

THX in advance


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Hyperlink Error in Excel when using #

I'm surprised that # would work anywhere within a file path...

The octothorpe is a reserved character in URIs, indicating a fragment
identifier follows. As in:

Ref: http://rfc.net/std0066.html#s3.5.


In article ,
CerealKiller wrote:

I've been working on a macro in Excel that creates hyperlinks to files in a
folder. The macro works fine, but I found that Excel can't manage hyperlinks
when the folder name begins with"#" and it's located in the root directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that
character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Hyperlink Error in Excel when using #

THX, but that is a little depressing.

Is there any alternative to hyperlink when using macros?
Something like FILE in http.

THX again

"JE McGimpsey" wrote:

I'm surprised that # would work anywhere within a file path...

The octothorpe is a reserved character in URIs, indicating a fragment
identifier follows. As in:

Ref: http://rfc.net/std0066.html#s3.5.


In article ,
CerealKiller wrote:

I've been working on a macro in Excel that creates hyperlinks to files in a
folder. The macro works fine, but I found that Excel can't manage hyperlinks
when the folder name begins with"#" and it's located in the root directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that
character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink Error in Excel when using #

You could open the file directly:

Option Explicit
Sub testme()
Dim wkbk As Workbook

Set wkbk = Nothing
On Error Resume Next
Set wkbk = Workbooks.Open("d:\# DBs Nielsen.xls")
On Error GoTo 0

If wkbk Is Nothing Then
Beep
MsgBox "not found"
End If

End Sub

CerealKiller wrote:

THX, but that is a little depressing.

Is there any alternative to hyperlink when using macros?
Something like FILE in http.

THX again

"JE McGimpsey" wrote:

I'm surprised that # would work anywhere within a file path...

The octothorpe is a reserved character in URIs, indicating a fragment
identifier follows. As in:

Ref: http://rfc.net/std0066.html#s3.5.


In article ,
CerealKiller wrote:

I've been working on a macro in Excel that creates hyperlinks to files in a
folder. The macro works fine, but I found that Excel can't manage hyperlinks
when the folder name begins with"#" and it's located in the root directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that
character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.



--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Hyperlink Error in Excel when using #

Depends on what you're trying to do - you can use Workbooks.Open if the
file is an XL Workbook. There are various ways to open text files or
other Office document types.


Your example doesn't really specify.

OTOH, I'd really suggest avoiding reserved URI characters in file
paths...


In article ,
CerealKiller wrote:

THX, but that is a little depressing.

Is there any alternative to hyperlink when using macros?
Something like FILE in http.

THX again

"JE McGimpsey" wrote:

I'm surprised that # would work anywhere within a file path...

The octothorpe is a reserved character in URIs, indicating a fragment
identifier follows. As in:

Ref: http://rfc.net/std0066.html#s3.5.


In article ,
CerealKiller wrote:

I've been working on a macro in Excel that creates hyperlinks to files in
a
folder. The macro works fine, but I found that Excel can't manage
hyperlinks
when the folder name begins with"#" and it's located in the root
directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that

character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Hyperlink Error in Excel when using #

Thank You both.

I wanted to create an automated directory in excel with hyperlinks linking
the files.
Some people is always asking where some file is located. So I wanted to make
things a easier for computer-handycapped people ;)

THX again


"JE McGimpsey" wrote:

Depends on what you're trying to do - you can use Workbooks.Open if the
file is an XL Workbook. There are various ways to open text files or
other Office document types.


Your example doesn't really specify.

OTOH, I'd really suggest avoiding reserved URI characters in file
paths...


In article ,
CerealKiller wrote:

THX, but that is a little depressing.

Is there any alternative to hyperlink when using macros?
Something like FILE in http.

THX again

"JE McGimpsey" wrote:

I'm surprised that # would work anywhere within a file path...

The octothorpe is a reserved character in URIs, indicating a fragment
identifier follows. As in:

Ref: http://rfc.net/std0066.html#s3.5.


In article ,
CerealKiller wrote:

I've been working on a macro in Excel that creates hyperlinks to files in
a
folder. The macro works fine, but I found that Excel can't manage
hyperlinks
when the folder name begins with"#" and it's located in the root
directory.
Something like this

"D:\# DBs Nielsen"

would cause Excel to generate an invalid hyperlink.
I've checked and it's not a macro bug, Excel can't seem to work with that

character.

Anyone knows how to fix this? I really would like to solve this without
changing the folder name as it's a shared server folder.


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
Find Error, Hyperlink.. nastech Excel Discussion (Misc queries) 0 July 12th 06 08:16 PM
Error using hyperlink tsosmoulis Excel Discussion (Misc queries) 1 June 7th 06 10:18 AM
error in hyperlink desparate Excel Discussion (Misc queries) 2 February 20th 06 02:08 AM
error in hyperlink desparate Excel Discussion (Misc queries) 0 February 17th 06 07:11 AM
hyperlink error: "Cannot open the specified file" Kate Choi Excel Worksheet Functions 1 January 18th 05 02:38 AM


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