|
- Sub url()
- mystr = InputBox("请输入a标签的title属性", "title属性", "excel学习")
- ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:="http://www.excelpx.com/", SubAddress:="", ScreenTip:=mystr, TextToDisplay:=Selection.Text
- End Sub
复制代码
这个代码是word中用的,
,点了取消也会添加超链接,如何设计点了取消就跳出程序?
Sub url()
mystr = InputBox("请输入a标签的title属性", "title属性", "excel学习")
IF LEN(MYSTR)THEN
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:="http://www.excelpx.com/", SubAddress:="", ScreenTip:=mystr, TextToDisplay:=Selection.Text
END IF
End Sub
|
|