Hallo,
For example, I have the following procedure to Load a form:
Public Sub LoadClient(ByVa l Caption As String)
Dim frmClient As New frmClient()
frmClient.MdiPa rent = frmMainMDI
frmClient.Text = Caption
frmClient.Show( )
frmClient.Focus ()
frmMainMDI.Text = "Prod 2008 - " & Caption
frmMainMDI.btnC lientNew.Enable d = False
End Sub
So to load it, I only call this: LoadClient("New Client")
But I need to write almost the same to load another form. The only
thing I change is frmClient and the buttom I want to disable in this
case.
So my question is this: Is it posible to make a generic procedure so I
only pass the values I want like in Caption? or I need a diferent
approach to acomplish this task? If so how?
Thanks in advance
Best Regards,
David Desmet
For example, I have the following procedure to Load a form:
Public Sub LoadClient(ByVa l Caption As String)
Dim frmClient As New frmClient()
frmClient.MdiPa rent = frmMainMDI
frmClient.Text = Caption
frmClient.Show( )
frmClient.Focus ()
frmMainMDI.Text = "Prod 2008 - " & Caption
frmMainMDI.btnC lientNew.Enable d = False
End Sub
So to load it, I only call this: LoadClient("New Client")
But I need to write almost the same to load another form. The only
thing I change is frmClient and the buttom I want to disable in this
case.
So my question is this: Is it posible to make a generic procedure so I
only pass the values I want like in Caption? or I need a diferent
approach to acomplish this task? If so how?
Thanks in advance
Best Regards,
David Desmet
Comment