Because your using Set on an Integer. You only need to use set on an Object,
like a recordset e.g. To get your code working, simply remove the word Set.
i.e.
Private Sub MyButton_Click()
Dim x As Integer
x = 3
End Sub
Hope this helps
Tony Oakley
Quote:
> When compiling the following proc, why do I get an "Error 424:
> Object needed" ?
> Thanx for any help.
> Private Sub MyButton_Click()
> Dim x As Integer
> Set x = 3
> End Sub
> --
> ________________________________________________________________________
> Christoph Keller
> Department of Veterinary Surgery - University of Zurich
> Winterthurerstrasse 260 - CH-8057 Zurich - Switzerland
> Phone ++41 79 414 83 04 / Fax ++41 1 313 03 84
> --
> ________________________________________________________________________
> Christoph Keller
> Department of Veterinary Surgery - University of Zurich
> Winterthurerstrasse 260 - CH-8057 Zurich - Switzerland
> Phone ++41 79 414 83 04 / Fax ++41 1 313 03 84