![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
I thought an OnTime procedure was supposed to execute, even if Excel was closed or the computer is off, and the time had passed. When you turn your computer on and open Excel isn't it supposed to execute then?
Mine doesn't do anything if I don't have Excel open. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
OnTime is qualified by the application. (i.e. Excel session). If Excel isn't open, OnTime ain't gonna do squat.
Out of interest, who told you that it would work even if the computer was turned off? |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
Not that it would work if the computer is off, but would execute when the workbook was opened, even if the time had passed. What do you suggest I use to add data into specific cells on the 1st of every month ie:vacation time as the dates occure? I've tried just about everything, even the date now in the workbook open. I have 12 months to add in 2 different cells on 18 worksheets.
Any ideas? By the way that's what I was working on yesterday and I failed to thank you for you help. Thanks Mark |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
I'm not quite following you. What data is being added on the first of the month? Where is the data coming from?
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
I have a workbook with 18 epmloyees on it and I would like Excel to add sick time and vaction time on the 1st day of every month. I supply the amount and what sheets the amount goes on and I even select which cells. What I am trying to do is enter this data in the code and when ie:May 1st rolls around Excel will add the time from the code. If the workbook isn't opened on May 1st, I need the code to apply when the workbook is finally opened.
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
OK, that sounds a bit more reasonable.
I would suggest something like this:
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Jun 2006
Posts: 10
|
Hello,
I see you are an expert programmer. Hoping you can help. I am trying the following code to get the Time start function up and running. Sub TimeStart() Application.OnTime TimeValue("14:30:00"), "Time" End Sub But to my dismay this is not working, the 'Time' macro does not work. My excel session is open at this time. Your help would be much appreciated. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|