Re: not use
From: Mark (markgora_at_hotmail.com)
Date: 05/20/04
- Next message: FxM: "Re: Can I use serial comm port in Excel VB script?"
- Previous message: Bob Phillips: "Re: problem using VBA in Excel"
- In reply to: Harald Staff: "Re: not use"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 May 2004 01:07:58 -0700
Hi Harald!
I not very smart in VBA, yet.
I write following code, not work good:
(in body workshhet)
Public dd as Date
Sub Worksheet_Change(ByVal Target As Range)
dd = Now
Application.OnTime dd + TimeValue("00:00:05"), "check"
End Sub
(in body module)
Public dd As Date
Sub check()
a = Now
If a - dd < 5 Then
MsgBox "*** don't used for 5 sek. "
End If
End Sub
My variable dd isn't global why?
Msgbox still on...
I'd like check not used *** for e.g 5 sek. and if not
used then show info and next check if not used 5 sek.
Please help!
Regards
Mark
>-----Original Message-----
>I'm not sure I understand this question. But you have to
define every single
>event that qualifies for your "in use" definition and put
some code there.
>
>HTH. Best wishes Harald
>
>"Mark" <markgora@hotmail.com> skrev i melding
>news:e9ad01c43cd3$a0eae090$a001280a@phx.gbl...
>> Hi Harald,
>>
>> How will be in not used userform?
>> Coridially
>> Mark
>>
>>
>> >-----Original Message-----
>> >Hi Mark
>> >
>> >Use a global Date variable and set it to Now on all
sorts
>> of events
>> >(Worksheet_change, Worksheet_Selectionchange,
>> Worksheet_Activate, ... ).
>> >Then have a macro that for certain intervals checks if
>> this variable is more
>> >than 20 minutes old.
>> >
>> >HTH. Best wishes Harald
>> >
>> >"Mark" <markgora@hotmail.com> skrev i melding
>> >news:e89501c43ccf$9abe0de0$a601280a@phx.gbl...
>> >> I looking for code - if activeworkbook not use for 20
>> >> minutes then stuff ..
>> >>
>> >> Please advise I would be very grateful.
>> >>
>> >> Regards
>> >> Mark
>> >
>> >
>> >.
>> >
>
>
>.
>
- Next message: FxM: "Re: Can I use serial comm port in Excel VB script?"
- Previous message: Bob Phillips: "Re: problem using VBA in Excel"
- In reply to: Harald Staff: "Re: not use"
- Messages sorted by: [ date ] [ thread ]