我尝试调用过程给人以参数时,它抛出一个编译错误,指出“预期:=”。编译错误“预期:=”调用另一个程序
...
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)”时失败。 它只适用于一个参数,但不适用于两个参数。但在我的理解中,使用参数语法的过程调用是正确的。可能是什么问题?
参见[这是混乱的,为什么不总是使用括号?](http://stackoverflow.com/documentation/vba/1179/procedure-calls/3818/this-is-confusing-why-不,刚刚一直使用,括号#T = 201705051655467680223),以了解为什么你需要删除括号那里。您的过程调用语法是* not *权限。 –