Hi
Is it possible to send in a form name to a function in order to set a dialog as an object. (sounds odd, but pls. see example below)
– this will enable me to re-use a single sub for a lot of various call types.
Sub 1
dim strFrmIs as string
‘here runs a lot of initial code
‘- then I need some user Input
‘after that I would like the Form name to be the identifier of which function that is calling – to avoid hard coding names.
strFrmIs=frm.Name
Sub 3 strFrmIs
End sub
‘***************************************
Sub 2
dim strFrmIs as string
strFrmIsr=frm.Name
Sub3 strFrmIs
End sub
‘*************************************’
Sub 3(frmName as string)
set ThisDlg = (frmName)
frmName.show
“bla.bla.bla.bla”
End sub