I am using VB5. I am trying to pass objects such as Data1 and frmForm1 from
a form module (Form1.FRM) to procedures in the standard module (Module1.BAS)
. The Data1 is type of Data, and the frmForm1 is type of Form. The
following is the sample code. I view the values in the Watch window. All
the buttons enabled status changed as specified when the Sub
changeButtonStat is executed, but the buttons on the frmForm1 did not get
changed when the execution resumes at the form module. Does anyone know
why? Is this the correct way to pass objects in VB5? Thanks for your help.
I would appreciate if you would copy your reply to my email address.
'from Form1.FRM
private sub txtFields_Change(Index As Integer)
call changeButtonStat(frmForm1)
end sub
'from Module1.BAS
public sub changeButtonStat(ByRef FormName as Form)
with FormName
.cmdAddBtn.enabled = false
.cmdEditBtn.enabled = false
.cmdDeleteBtn.enabled = false
end with
end sub
--
Jonathan