再发挥一下,用漂亮的按钮来实现:
Sub 生成超链接()
'
' 时间: 2005-2-17
'
'生成工作薄表目录,以按钮进行链接
'
For i = 2 To Sheets.Count
ActiveSheet.Shapes.AddShape(msoShapeActionButtonCustom, 352.5, 80 + (i - 2) * 40, 73.5, 25). _
Select
Selection.Characters.Text = Sheets(i).Name
With Selection.Characters(Start:=1, Length:=2).Font
.Name = "华文新魏"
.FontStyle = "常规"
.Size = 12
End With
Selection.HorizontalAlignment = xlCenter
ActiveSheet.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), _
Address:="", SubAddress:=Sheets(i).Name & "!A1", TextToDisplay:=Sheets(i).Name
Next i
End Sub
[此贴子已经被作者于2005-2-18 10:53:23编辑过]
|