I want to pass three variables to a sub routine. I cannot figure out the syntax. I have an example which works with one variable, but I get an error when I scale it to two or more.
This one works:
Private Sub DateBoxVisible(x As Boolean)
Me.startdate.Visible = x
Me.lblstartdate.Visible = x
Me.enddate.Visible = x
Me.lblenddate.Visible = x
End Sub
Private Sub btnSpecificDate_GotFocus()
x = True
DateBoxVisible (x)
End Sub
This one throws an error (expected =) on the last line
Private Sub InitPos(MC As Boolean, AVO As Boolean, UAST As Boolean)
Me.comboMCName.Visible = MC
Me.comboAVOName.Visible = AVO
Me.comboUASTName.Visible = UAST
Me.optDateRange.Visible = True
End Sub
Private Sub btnAVP_GotFocus()
MC = False
AVO = True
UAST = False
InitPos (MC,AVO,UAST)
end sub
There is a syntax error in " initpos(MC,AVO,UAST) but I have tried every combination I can think of.