I have a form1 with a command button. The command button calls a module, but for some reason it's not working. The module is coded to load form2, and on it draw a line at run time.

Could someone please help me out? I keep getting an error saying:

'Method or data member not found', and Line1 is highlighted.

Thanks for any help!

'there is form1, form2 and module1
'Command button on form1
Private Sub Command1_Click()
Call line1
End Sub


'code for the module
Public Sub line1()
Form2.Show
Form2.Controls.Add "VB.line", "line1"
Form2.line1.X1 = 1560
Form2.line1.X2 = 1560
Form2.line1.Y1 = 1800
Form2.line1.Y2 = 4800
Form2.line1.Visible = True
End Sub