I am currently writing a Poker Clock program in VB 2008. I have got everything working up until I try and type this (on a button)

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Interval = 120000
End Sub
End Class

120000 being 2 minutes, I am getting an error at the bottom Name 'Timer1 is not declared' but i can use the same (Timer1.Interval = 120000) somewhere else but not on the button

Help please i am confused

ty luke

Is Timer1 the member of Current Form? Have you check it?

Also Where you declared Timer1?

Private WithEvents timer1 As System.Windows.Forms.Timer

Thank you for everyones help, I figured from this message

Is Timer1 the member of Current Form? Have you check it?
Also Where you declared Timer1?

That the item has to be on the same form, and anyway, that will be wrong, but i am not bothered anyway, so thank you

SOLVED

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.