I am trying to make a simple form with a close button separate from the x in the top right corner.
I have made the button in the middle of the form. The button is called Command1. In the code section of the button I have:
When the form loads it displays the button alright and when I click it it says:
"Compile Error: Syntax Error"
And that's it? One lead to why this error is occurring might be that when I type "Me." and wait for the small helper window to come up, the method Close is not in the options.
I have also tried substituting the name of the form in for Me and it yields the same error.
Thanks for any help.
I have made the button in the middle of the form. The button is called Command1. In the code section of the button I have:
Code:
Private Sub Command1_Click()
Me.Close()
End Sub
When the form loads it displays the button alright and when I click it it says:
"Compile Error: Syntax Error"
And that's it? One lead to why this error is occurring might be that when I type "Me." and wait for the small helper window to come up, the method Close is not in the options.
I have also tried substituting the name of the form in for Me and it yields the same error.
Thanks for any help.