Skip to content

Commit 3e3727f

Browse files
committed
フォルダツリー作成で、ファイル名に「#」があるとハイパーリンクが動作しない #72
1 parent 5633b44 commit 3e3727f

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

RelaxTools.xlam

-1.15 MB
Binary file not shown.

Source/src/Form/frmTreeList.frm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Private Sub cmdRun_Click()
133133
If chkFolder.Value Then
134134
ActiveSheet.Hyperlinks.Add _
135135
Anchor:=Cells(lngRow, lngCol), _
136-
Address:=strPath, _
136+
Address:=FileToURL(strPath), _
137137
TextToDisplay:=strPath
138138
End If
139139

@@ -234,7 +234,7 @@ Private Sub FileDisp(objFs, ByVal strPath, lngRow, ByVal lngCol, ByVal lngHCol A
234234
If chkFile.Value Then
235235
ActiveSheet.Hyperlinks.Add _
236236
Anchor:=Cells(lngRow, lngCol2), _
237-
Address:=rlxAddFileSeparator(strPath) & colFiles.Item(objKey).Name, _
237+
Address:=FileToURL(rlxAddFileSeparator(strPath) & colFiles.Item(objKey).Name), _
238238
TextToDisplay:=colFiles.Item(objKey).Name
239239
End If
240240

@@ -298,7 +298,7 @@ Private Sub FileDisp(objFs, ByVal strPath, lngRow, ByVal lngCol, ByVal lngHCol A
298298
If chkFolder.Value Then
299299
ActiveSheet.Hyperlinks.Add _
300300
Anchor:=Cells(lngRow, lngCol2), _
301-
Address:=colFolders.Item(objKey).Path, _
301+
Address:=FileToURL(colFolders.Item(objKey).Path), _
302302
TextToDisplay:=rlxGetFullpathFromFileName(colFolders.Item(objKey).Path)
303303
End If
304304

Source/src/Modules/basCommon.bas

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,3 +3015,8 @@ Function SpecialCellsEx(v As Range) As Range
30153015
Set SpecialCellsEx = r
30163016

30173017
End Function
3018+
Function FileToURL(ByVal arg As String) As String
3019+
3020+
FileToURL = "file:///" & Replace(arg, "#", "%23")
3021+
3022+
End Function

Version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
◇バグ修正
33
・VBAステップカウントの誤字を修正。
44
・結合セルの高さ拡張の誤字 #71
5+
・フォルダツリー作成で、ファイル名に「#」があるとハイパーリンクが動作しない #72
56

67
2020/12/27(sun) RelaxTools-Addin Version 4.27.2(RustRemover)
78
◇バグ修正

0 commit comments

Comments
 (0)