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: 1
Default TIME reference - Excel 2003

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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a quick reference guide for excel 2003 -2007 Noella Excel Discussion (Misc queries) 5 February 1st 10 06:55 AM
How to combine two list on one reference line Excel 2003 troubled excel user Excel Discussion (Misc queries) 1 July 25th 07 12:32 AM
Excel 2003 - Copy Cell Reference Nicole Excel Worksheet Functions 2 September 7th 05 05:46 PM
Missing Reference in Excel 2003 Dirk Franke Excel Discussion (Misc queries) 5 January 26th 05 01:24 PM
using a reference in vlookup with excel 2003 Gord Dibben Excel Worksheet Functions 0 October 28th 04 01:27 AM


All times are GMT +1. The time now is 07:38 AM.

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"