超链接代码
Sub 超链接()
Dim MyPath$, MyFile$, k
MyPath = ThisWorkbook.Path & "\"
MyFile = Dir(MyPath, vbDirectory)
Do
If MyFile <> "" And Len(Replace(MyFile, ".", "")) <> 0 Then
k = k + 1
Sheet1.Hyperlinks.Add Cells(k, 32), ThisWorkbook.Path & "\" & MyFile, , , MyFile
End If
MyFile = Dir
Loop While MyFile <> ""
Sheet1.Range("af1").Clear
Sheet1.Range("af1") = "超链接"
End Sub