LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default if not used..

Hi Experts,
I'd like check modification in worksheet. If haven't
change in sheet for each intervals (e.g. each 30 second)
then get info "Will you still work?" vbYesNo.
Yes (still work) , No (close workbook).
I have written follow script but it function badly:

(in body worksheet)
Public dd As Date
Sub Worksheet_Change(ByVal Target As Range)
dd = Now
Application.OnTime dd + TimeValue("00:00:30"), "check"
End Sub

(in body module)
Public dd As Date
Public A as Date
Sub check()
A = Now
If A - dd < 30 Then ' although dd is public variable dd =
0 , why ???

....
End If
End Sub

There are some solutions in NET, but can anyone provide
full correct VBA script?


I've excel 2k.

Kindly regards
Mark

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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



All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"