ok, I used the code:

Declare Function ExitWindowsEx Lib "user32.dll" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long

Private Sub Timer1_Timer()
Label1.Caption = Format(Time, "HH:MM:SS")
If Text1.Text = Label1.Caption Then
Call ExitWindowsEx(1, 0)
End If
End Sub

the problem I am running into is that it what let me declare the function as public. If I declare it as private, it won't run. By the way, this code is to have VB automatically shut down windows at a certain time. Any info is appreciated.