Attribute VB_Name = "模块1" Sub AddLinks() Attribute AddLinks.VB_ProcData.VB_Invoke_Func = " \n14" ' ' AddLinks 添加本列的链接 ' Dim i, j j = 3 j = Selection.Column For i = 2 To 1000 ActiveSheet.Hyperlinks.Add Anchor:=Cells(i, j), Address:=Cells(i, j).Text, TextToDisplay:=Cells(i, j).Text If Cells(i, j) = "" Then i = 1000 '不记得如何跳出For循环,手动置为最大值,帮助跳转 End If Next i End Sub Sub AddLink() ' ' AddLink 添加本单元链接 ' ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=ActiveCell.Text, TextToDisplay:=ActiveCell.Text End Sub