Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings Everybody!
At another Excel forum I had posted a thread regarding a problem I had using the Time() function in Excel 2003 (our office just recently upgraded, which is causing me to have to re-write all of my macros...grr). I was advised to change the code to use the Format function in conjunction with the now() function instead, which worked, for a little while. Now it's not working again, and the reason has something to do with the TIME reference. The first time I run the macro after opening the spreadsheet, it won't work, and I get an error that highlights the following code : RightNow = Format(Now(), "Hh") (RightNow is a variable declared at the beginning of the macro). If I move the TIME reference up or down, any amount of spaces, on the references table, and then rerun the macro, it works PERFECTLY. No errors, no problems, nothing. This has me perplexed, because if I close the file down, and open in again, the SAME thing happens. Doesn't work the first time, then if I move the TIME reference at all, in any direction, it works just fine. How do I fix this so it works all the time, without having to move the reference every time I want to run the macro?? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a quick reference guide for excel 2003 -2007 | Excel Discussion (Misc queries) | |||
How to combine two list on one reference line Excel 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 - Copy Cell Reference | Excel Worksheet Functions | |||
Missing Reference in Excel 2003 | Excel Discussion (Misc queries) | |||
using a reference in vlookup with excel 2003 | Excel Worksheet Functions |