ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to followhyperlink to a folder with a minus sign in the name (https://www.excelbanter.com/excel-programming/415038-how-followhyperlink-folder-minus-sign-name.html)

ChristopherL

How to followhyperlink to a folder with a minus sign in the name
 
Hello, how do I use "followhyperlink" to open a folder with a minus
sign in its name?

All of the following string arguments (such as below) have failed:

"<c:\file-1:
"'c:\file-1'"
"file://c:\file-1"
"c:\file%xy1"
"c:\filexy%1"
"'c:\filexy%1'"

xy is the ascii hex number for minus.

All of this has been typed from memory, and so I may have typed a
string incorrectly above!

Thank you,
Christopher Lusardi



Gary''s Student

How to followhyperlink to a folder with a minus sign in the name
 
Sub qwerty()
ActiveWorkbook.FollowHyperlink Address:="file:///c:\temp\a-b"
End Sub
--
Gary''s Student - gsnu2007k


All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com