I am having a problem passing parameters..
I am trying to pass the parameter boolPlans which contains a 0 or 1 value to another procedure in another form.
However, when I run this, I get the error:
Microsoft VBScript Runtime error: Wrong number of arguments or invalid property assignment: ConsolidateCompany
------------------------------------------------------------
MY CODE
------------------------------------------------------------
Sub HasRSPlans()
Dim boolPlans '(to see whether plan is attached or not)
With rstPrimaryRecordset
If UIMaster.RUICenter.GetRecordset(strsRSPlan).RecordCount > 0 then
Global.CMSMsgBox "Has RS Plans attached", vbOKOnly,"Warning"
boolPlans = 1
ConsolidateCompany(boolPlans)
Else
Global.CMSMsgBox "No RS Plans attached", vbOKOnly,"Warning"
boolPlans = 0
ConsolidateCompany(boolPlans)
end if
End With
End Sub
---------------------------------------------------------
(2.)
Sub ConsolidateCompany(boolPlans)
MsgBox "If Plans attached is 1 and if not is 0: ..." & boolPlans
End Sub
Can someone please help me out urgently. I desperately need help as I don't know what is wrong..
I am trying to pass the parameter boolPlans which contains a 0 or 1 value to another procedure in another form.
However, when I run this, I get the error:
Microsoft VBScript Runtime error: Wrong number of arguments or invalid property assignment: ConsolidateCompany
------------------------------------------------------------
MY CODE
------------------------------------------------------------
Sub HasRSPlans()
Dim boolPlans '(to see whether plan is attached or not)
With rstPrimaryRecordset
If UIMaster.RUICenter.GetRecordset(strsRSPlan).RecordCount > 0 then
Global.CMSMsgBox "Has RS Plans attached", vbOKOnly,"Warning"
boolPlans = 1
ConsolidateCompany(boolPlans)
Else
Global.CMSMsgBox "No RS Plans attached", vbOKOnly,"Warning"
boolPlans = 0
ConsolidateCompany(boolPlans)
end if
End With
End Sub
---------------------------------------------------------
(2.)
Sub ConsolidateCompany(boolPlans)
MsgBox "If Plans attached is 1 and if not is 0: ..." & boolPlans
End Sub
Can someone please help me out urgently. I desperately need help as I don't know what is wrong..