![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
How can I get a macro to run every twenty minutes? Jock |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 81
|
Hi,
Try putting this code in a loop newHour = Hour(Now()) newMinute = Minute(Now())+20 newSecond = Second(Now()) waitTime = TimeSerial(newHour, newMinute, newSecond) Application.Wait waitTime obviously need to dim the variables! Ed |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Youll have to forgive me as my VBA skills are rather basic. How would I do this? Where would I put it? This is my macro:
Application.ScreenUpdating = False Sheets("DMX").Activate Range("A2:L850").Select Selection.sort Key1:=Range("J1"), Order1:=xlDescending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Rows("850:1250").ClearContents Range("A1").Select Sheets("DAV").Select Jock [ This Message was edited by: Jockstrap on 2002-04-26 03:39 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|