【发布时间】:2015-09-24 11:23:01
【问题描述】:
//大家好,如果你为我做这件事,你会和我约会。 我正在使用以下宏打开“J:J”列中的超链接。并添加了一个 MsgBox 来循环它。如果用户点击它,我将继续下一步。 我需要 MsgBox 上的“是”和“否”按钮。如果我点击 Yes 我应该继续,如果我点击 No 然后我想调用另一个模块,比如 Sub refresh() 。提前致谢。
Sub OpenLinks()
Dim Cell As Range
Set LinkRng = Range("J1").CurrentRegion.Columns(1)
On Error Resume Next
For Each Cell In LinkRng.Cells
Cell.Hyperlinks(1).Follow
Do
If ie.readyState = 4 Then
ie.Visible = False
Exit Do
Else
DoEvents
End If
Loop
MsgBox "OK"
ie.Visible = True
Next
On Error GoTo 0
End Sub
【问题讨论】: