PC Review


Reply
 
 
=?Utf-8?B?UGhpbG9zb3BoYWll?=
Guest
Posts: n/a
 
      11th Jul 2007
Looking to have a timer set off an alarm at 15 minute intervals as in Visual
Basic.net
Dim WithEvernts Timer1 as Timer

Dim TimeRemaining as Integer ==15*60

Private Sub Worksheet_Open
Timer1.Interval=5000
Timer1 Enabled=True
Timer1.Start() ' this does not work in Excel but does in VB.net
end sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick

TimeRemaining=TimeRemaining-5
If timeRemaing =0 then
....
Enact Alarm
....
TimeRemaining=15*60
End if
End Sub
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      11th Jul 2007
In Excel VBA, you can use the OnTime method. See
www.cpearson.com/excel/OnTime.aspx for details and example code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Philosophaie" <(E-Mail Removed)> wrote in message
news:A27C9F4C-48C6-462F-AF02-(E-Mail Removed)...
> Looking to have a timer set off an alarm at 15 minute intervals as in
> Visual
> Basic.net
> Dim WithEvernts Timer1 as Timer
>
> Dim TimeRemaining as Integer ==15*60
>
> Private Sub Worksheet_Open
> Timer1.Interval=5000
> Timer1 Enabled=True
> Timer1.Start() ' this does not work in Excel but does in VB.net
> end sub
>
> Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Timer1.Tick
>
> TimeRemaining=TimeRemaining-5
> If timeRemaing =0 then
> ...
> Enact Alarm
> ...
> TimeRemaining=15*60
> End if
> End Sub


 
Reply With Quote
 
=?Utf-8?B?UGhpbG9zb3BoYWll?=
Guest
Posts: n/a
 
      12th Jul 2007
Looking to make something flash on, off and recycle. Would nesting two
Application.OnTime functions?

"Chip Pearson" wrote:

> In Excel VBA, you can use the OnTime method. See
> www.cpearson.com/excel/OnTime.aspx for details and example code.
>
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting
> www.cpearson.com
> (email on the web site)
>
>
> "Philosophaie" <(E-Mail Removed)> wrote in message
> news:A27C9F4C-48C6-462F-AF02-(E-Mail Removed)...
> > Looking to have a timer set off an alarm at 15 minute intervals as in
> > Visual
> > Basic.net
> > Dim WithEvernts Timer1 as Timer
> >
> > Dim TimeRemaining as Integer ==15*60
> >
> > Private Sub Worksheet_Open
> > Timer1.Interval=5000
> > Timer1 Enabled=True
> > Timer1.Start() ' this does not work in Excel but does in VB.net
> > end sub
> >
> > Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles Timer1.Tick
> >
> > TimeRemaining=TimeRemaining-5
> > If timeRemaing =0 then
> > ...
> > Enact Alarm
> > ...
> > TimeRemaining=15*60
> > End if
> > End Sub

>

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      12th Jul 2007
You could adapt the code for blinking text at
http://www.cpearson.com/excel/BlinkingText.aspx .


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Philosophaie" <(E-Mail Removed)> wrote in message
news:4C39D53D-7AFE-484D-919F-(E-Mail Removed)...
> Looking to make something flash on, off and recycle. Would nesting two
> Application.OnTime functions?
>
> "Chip Pearson" wrote:
>
>> In Excel VBA, you can use the OnTime method. See
>> www.cpearson.com/excel/OnTime.aspx for details and example code.
>>
>>
>> --
>> Cordially,
>> Chip Pearson
>> Microsoft MVP - Excel
>> Pearson Software Consulting
>> www.cpearson.com
>> (email on the web site)
>>
>>
>> "Philosophaie" <(E-Mail Removed)> wrote in message
>> news:A27C9F4C-48C6-462F-AF02-(E-Mail Removed)...
>> > Looking to have a timer set off an alarm at 15 minute intervals as in
>> > Visual
>> > Basic.net
>> > Dim WithEvernts Timer1 as Timer
>> >
>> > Dim TimeRemaining as Integer ==15*60
>> >
>> > Private Sub Worksheet_Open
>> > Timer1.Interval=5000
>> > Timer1 Enabled=True
>> > Timer1.Start() ' this does not work in Excel but does in VB.net
>> > end sub
>> >
>> > Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
>> > System.EventArgs) Handles Timer1.Tick
>> >
>> > TimeRemaining=TimeRemaining-5
>> > If timeRemaing =0 then
>> > ...
>> > Enact Alarm
>> > ...
>> > TimeRemaining=15*60
>> > End if
>> > End Sub

>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alarm timer in Excel =?Utf-8?B?Qm9iIENvb2s=?= Microsoft Excel Programming 1 20th Jul 2007 08:40 AM
Using timer as Alarm clock =?Utf-8?B?T2xzemFuc2tpQQ==?= Microsoft Access VBA Modules 4 19th Jan 2006 06:55 PM
Plus! Alarm Clock and Sleep Timer =?Utf-8?B?b3BlcmFmbHV0ZQ==?= Windows XP General 9 16th May 2005 06:47 PM
Timer Alarm jimbo Microsoft Excel Programming 6 28th Mar 2005 08:02 PM
Req: tiny systray alarm/timer Canetoad Freeware 18 18th Nov 2004 10:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:05 AM.