why*_*heq 0 excel vba excel-vba
我有以下内容
Public Sub BreakAllLinks(ByRef aWkBook As Excel.Workbook)
Dim Link As Variant
Dim myLinks As Variant
myLinks = aWkBook.LinkSources(Type:=Excel.xlLinkTypeExcelLinks)
If Not (myLinks = Empty) Then
For Each Link In myLinks
aWkBook.BreakLink Name:=Link, Type:=Excel.xlLinkTypeExcelLinks
Next Link
End If
End Sub 'BreakAllLinks
Run Code Online (Sandbox Code Playgroud)
如果myLinks为空,那么它运行良好并避免For Each循环,但如果myLinks包含一些链接,那么我得到以下错误
运行时错误'13'
有什么问题If Not (myLinks = Empty) Then?
| 归档时间: |
|
| 查看次数: |
51 次 |
| 最近记录: |