'Call the module
Private Sub Button_Click
Call ExpandForm(Me, Me.Form_Subform)
End Sub
'-------------------
'The module
Public Function ExpandForm(strMainForm As Form, strSubform As Form)
strSubform.Visible = True
strMainForm.InsideWidth = 8000
strSubform.Left = 500
Wait 1
strMainForm.InsideWidth = 8500
strSubform.Left = 1000
Wait 1
strMainForm.InsideWidth = 9000
strSubform.Left = 1500
Wait 1
'this just continues on to the desired form width and drags the subform with it
End Function
|