【发布时间】:2017-09-22 02:19:45
【问题描述】:
我尝试调用一个提供参数的过程,它会抛出一个编译错误,说明“预期:=”。
...
Dim isWorkaround As Boolean
isWorkaround = False
If Check101.Value = True Then
isWorkaround = True
End If
...
'Procedure I try to call
ElseIf Combo_Report_Selection = "Adjusted Report" And Combo_someOther= "Other" Then
Call_01_Adj_Report(div, isWorkaround)
ElseIf Combo_Report_Selection = "Upload Log" Then
Call_03_Upload_Log
ElseIf Combo_Report_Selection = "Gather Summary" Then
Call_04_Adj_Summary
End If
Combo_Report_Selection.Value = Null
Combo_Statement.Value = Null
End Sub
__________________________________________
Private Sub Call_01_Adj_Report(ByRef calldiv As Long, ByRef isWorkaround As Boolean)
...
End Sub
__________________________________________
当我插入调用“Call_01_Adj_Report(div,isWorkaround)”时它失败了。 它仅在提供一个参数时有效,但不适用于两个参数。但据我了解,带参数语法的过程调用是正确的。可能是什么问题?
【问题讨论】:
-
请参阅this is confusing, why not just always use parentheses? 以了解为什么需要删除那里的括号。您的过程调用语法不正确。
-
@MathieuGuindon 链接现已断开,因为 Stackoverflow 已关闭“文档”
标签: vba