綠色字體是注釋 操作動(dòng)態(tài)圖 For Each是變量在某個(gè)集合里面循環(huán),這個(gè)集合可以是單元格,可以是工作表,也可以是工作薄,客官可以自行修改代碼進(jìn)行嘗試。 代碼如下: Dim a As Byte, d As Byte Dim arr As Range, str As String Sub xjclj() a = ActiveWorkbook.Sheets.Count d = 2 For Each arr In Selection.Resize(a - 1, 1) str = ActiveWorkbook.Sheets(d).Name ActiveSheet.Hyperlinks.Add Anchor:=arr, Address:="", SubAddress:= _ str & "!A1", TextToDisplay:=str d = d + 1 Next End Sub 轉(zhuǎn)發(fā)后可以幫助更多的人。 上一篇精彩內(nèi)容鏈接,點(diǎn)擊查看 |
|