All,
My VBA experience is very limited so please bear with me. I have a main
form which I want to add several timer events to but they need to fire at
different intervals. One say every 5 minutes and one every 30 minutes. I
know I could put several invisible unbound text boxes on the form and update
their values with the forms one timer event and then check the value of each
text box but I am trying to improve my VBA skills.
Is there a way in which I could store and update several variables to
memory? I have tried the following code but the ArchiveTimber value is reset
to zero once the code runs again rather than being incremented by the timer
interval.
Dim ArchiveTimer As Single
If ArchiveTimer > Me.TimerInterva l Then
ArchiveTimer = ArchiveTimer
Else
ArchiveTimer = Me.TimerInterva l
End If
ArchiveTimer = ArchiveTimer + Me.TimerInterva l
Debug.Print ArchiveTimer
Exit Sub
I'm obviously missing something here so I was hoping someone could point me
in the right direction.
TIA,
Mark
My VBA experience is very limited so please bear with me. I have a main
form which I want to add several timer events to but they need to fire at
different intervals. One say every 5 minutes and one every 30 minutes. I
know I could put several invisible unbound text boxes on the form and update
their values with the forms one timer event and then check the value of each
text box but I am trying to improve my VBA skills.
Is there a way in which I could store and update several variables to
memory? I have tried the following code but the ArchiveTimber value is reset
to zero once the code runs again rather than being incremented by the timer
interval.
Dim ArchiveTimer As Single
If ArchiveTimer > Me.TimerInterva l Then
ArchiveTimer = ArchiveTimer
Else
ArchiveTimer = Me.TimerInterva l
End If
ArchiveTimer = ArchiveTimer + Me.TimerInterva l
Debug.Print ArchiveTimer
Exit Sub
I'm obviously missing something here so I was hoping someone could point me
in the right direction.
TIA,
Mark
Comment