Ok Guys i hope your still willing to help me.i have changed some major things. BUT, i'm still having a problem. if i try to use a whole number it will work correctly, but if i use a decimal point in the number then it seems to divide by the decimal point instead of adding to the time. i'm kinda lost now.
Here's the whole code for your viewing enjoyment.
Option Explicit
Dim AlarmOn As Boolean
Dim Counting
Dim Seconz
Dim CurrentTime As Date
Private Sub Form_Load()
AlarmOn = True
unsure
End Sub
Private Function unsure()
'This was done as a test but may move to onload instead
Counting = 0
Seconz = 0
CurrentTime = Format$(Time$, "hh:mm:ss"

End Function
Private Function NextAlarmTime() As Date
Dim tme
Dim ALARM_INTERVAL
Dim time_now As Date
Dim h
Dim m
Dim seconds As Long
Dim next_m
currTime.Caption = Format$(Time$, "hh:mm:ss"
tme = (Amount) / (Multiply)
ALARM_INTERVAL = tme
Test.Caption = tme
' Get the hour and minutes.
h = DatePart("h", CurrentTime)
m = DatePart("n", CurrentTime)
___________________________________________________________
' Calculate the next multiple of ALARM_INTERVAL.
next_m = (((m \ ALARM_INTERVAL) + 1) * ALARM_INTERVAL)
NextAlarmTime = DateAdd("n", h * 60 + next_m, Date)
This is now the problem. i cannot use a number that has a decimal (i.e. 1.5)
___________________________________________________________
End Function
Private Sub tmrAlarm_Timer()
Static next_alarm As Date
Dim secs_to_go As Single
Dim Testing
next_alarm = 0
lblNextAlarm.Caption = Format$(next_alarm, "hh:mm:ss"

' See if we have initialized next_alarm.
If next_alarm = 0 Then
' Initialize next_alarm.
next_alarm = NextAlarmTime
lblNextAlarm.Caption = Format$(next_alarm, "hh:mm:ss"

currTime.Caption = Format$(Time$, "hh:mm:ss"

Data1.Recordset.MoveLast
End If
' See how many milliseconds until the next
' alarm time.
secs_to_go = DateDiff("s", Now, next_alarm)
' Stop the timer to clear previous alarms.
tmrAlarm.Enabled = False
' Set the timer's Interval.
If secs_to_go < 25 Then
If (Seconz = 0) Then
GoodBye.Caption = ""
' Fire the alarm.
Shell "C:\VBBB\alarm\shutdown.exe -l -f -t 30:", vbHide
Shell "c:\Alarm\end.bat", vbHide
GoodBye.Caption = "The Computer is going to ShutDown in 30 Sec."
' Reinitialize next_alarm.
next_alarm = NextAlarmTime
tmrAlarm.Enabled = True
Seconz = 1
End If
ElseIf secs_to_go < 60 Then
If (Counting = 0) Then
GoodBye.Caption = "The Computer is going to ShutDown in 60 Sec."
Counting = 1
End If
Else
End If
' Restart the timer.
tmrAlarm.Enabled = True
lblNextAlarm.Caption = Format$(next_alarm, "hh:mm:ss"

currTime.Caption = Format$(Time$, "hh:mm:ss"
End Sub
Thanx again guys.