返回列表 上一主題 發帖

[發問] EXCEL吃Word資料

回復 1# jhwish

呃,小弟也是新手,不知版大的意思是不是超連結丟入迴圈的意思,以下是小弟的某一個檔案可以做參考
  1. Sub 超連結()
  2.     Dim i As Long
  3.     With Worksheets("Sheet1") '你要選的資料表
  4.         For i = 2 To 152
  5.             On Error Resume Next
  6.             .Cells(i, 4).Hyperlinks.Delete
  7.             On Error GoTo 0
  8.             .Hyperlinks.Add Anchor:=.Cells(i, 4), _
  9.             Address:="LIST\Section" & Left(.Cells(i, 4).Text, 1) & "\" & .Cells(i, 4).Text, _
  10.             TextToDisplay:=.Cells(i, 4).Text  '超連結的資料夾及資料路徑, 但我的是文字檔形式, word....應該可以吧....
  11.         Next
  12.     End With
  13. End Sub
複製代碼
初新者~指教囉~

TOP

        靜思自在 : 為人處世要小心細心,但不要「小心眼」。
返回列表 上一主題