Sub mulu()
Range("b2:B600").ClearContents
Dim sht As Worksheet, i As Integer
i = 2
For Each sht In Worksheets
'Cells(i, "A") = i - 1
Cells(i, "B").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=sht.Name & "!A1", TextToDisplay:=sht.Name
i = i + 1
Next sht
End Sub
本帖最后由 hwc2ycy 于 2012-8-19 16:25 编辑
- sub mulu()
- Range("b2:B600").ClearContents
- Dim sht As Worksheet, i As Integer
- i = 2
- For Each sht In Worksheets
- 'Cells(i, "A") = i - 1
- Cells(i, "B").Select
- ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'" & sht.Name & "'" & "!A1", TextToDisplay:=sht.Name
- Debug.Print sht.Name & "!A1"
- i = i + 1
- Next sht
- End Sub
复制代码
|