[算表] VBA Hyperlinks 相对路径

楼主: JointBank (嘘~ 不要问!)   2018-02-28 06:39:33
软件:EXCEL
版本:2013
Sub HYPL()
Dim I As Integer
I = Workbooks("读取资料夹档案
.xlsm").Sheets(1).Range("D1").CurrentRegion.Rows.Count
For X = 1 To I
SROW =
Workbooks("test.xLSx").Sheets("TEST").Range("D1").CurrentRegion.Rows.Count
sUrl = "127K\" & Workbooks("读取资料夹档案.xlsm").Sheets("工作表
1").Range("D" & I).Value
ActiveSheet.Hyperlinks.Add Range("D" & SROW), sUrl,
TextToDisplay:=Workbooks("读取资料夹档案.xlsm").Sheets(1).Range("D" &
SROW).Value
Next
End Sub
已上方法的超连结会是绝对路径请问要怎么改成相对路径
谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com