-
repeate an action
hello
the following macro will save and close all open workbooks except the active workbook within 15 seconds.how do i make it repeate it's action?.
namely- how do i create my on autosave mechanism.
[VBA] Sub doit2()
Dim dnext As Date
dnext = TimeValue("00:00:15")
Application.OnTime Now + dnext, "closeallbut"
End Sub
[/VBA]
thanks
Last edited by malik641; 12-05-2005 at 11:58 AM.
Reason: Needed some VBA tags :-)
moshe
-
Just call the same sub with ontime. So it will keep calling itself.
[vba]
Option Explicit
Sub a()
MsgBox "Hi"
Application.OnTime Now + TimeSerial(0, 0, 2), "a"
End Sub
[/vba]
-
a question
hello
could you be more specific.your macro do not work.
thanks
moshe
-
You can just copy my code to a module in the VBE, then run it. The message box will keep poping up every 2 seconds.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules