![]() |
Now not regonized as a built in Function, in some spreadsheets?
I have two spreadsheets one works one does not. The only difference is the capital N in Now. Yes, in the line "If dtDate = 0" in both instances it is a zero. In the sheet that does NOT work when I type in a capital N and it makes it lower case. It will not regonize Now as a function and crashes with a "Compile error: expected Function or variable." The Sheet that works has this code: If dtDate = 0 Then dtDate = Now End If The sheet that does not work has this code: If dtDate = 0 Then dtDate = now End If It's Monday and I am already confused. Thanks for looking at this...Craigm -- Craigm ------------------------------------------------------------------------ Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381 View this thread: http://www.excelforum.com/showthread...hreadid=539850 |
Now not regonized as a built in Function, in some spreadsheets?
Hi Craig,
With the workbook in question active, run the problematic code When the code errors, go to the VBE and select the project in the Project Explorer Window Hit the reset button and look at the Tools | References list Look for any references marked as "MISSING". Either uncheck the reference or, if the reference is needed, try the browse button to locate the library, --- Regards, Norman "Craigm" wrote in message ... I have two spreadsheets one works one does not. The only difference is the capital N in Now. Yes, in the line "If dtDate = 0" in both instances it is a zero. In the sheet that does NOT work when I type in a capital N and it makes it lower case. It will not regonize Now as a function and crashes with a "Compile error: expected Function or variable." The Sheet that works has this code: If dtDate = 0 Then dtDate = Now End If The sheet that does not work has this code: If dtDate = 0 Then dtDate = now End If It's Monday and I am already confused. Thanks for looking at this...Craigm -- Craigm ------------------------------------------------------------------------ Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381 View this thread: http://www.excelforum.com/showthread...hreadid=539850 |
Now not regonized as a built in Function, in some spreadsheets?
Norman, I followed your suggestion. The exact same references are checked/unchecked. I tried typing in DateTime.Now putting the Now in with the pop-up window and it still makes it a lowercase n and crashes. I am dazzeled???? Thanks for looking at this. Craig -- Craigm ------------------------------------------------------------------------ Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381 View this thread: http://www.excelforum.com/showthread...hreadid=539850 |
Now not regonized as a built in Function, in some spreadsheets?
Do you have a name conflict on the crashing machine ? Some macro, area,
object, gizmo named "now" ? Or some installed addin with this conflict written into it ? HTH. Best wishes Harald "Craigm" skrev i melding ... Norman, I followed your suggestion. The exact same references are checked/unchecked. I tried typing in DateTime.Now putting the Now in with the pop-up window and it still makes it a lowercase n and crashes. I am dazzeled???? Thanks for looking at this. Craig -- Craigm ------------------------------------------------------------------------ Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381 View this thread: http://www.excelforum.com/showthread...hreadid=539850 |
Now not regonized as a built in Function, in some spreadsheets?
I have been writing modules building towards automated charting. One of the test modules is named....ready for this....Now(). Thanks Harald, I wound never searched for my Now() and this would not have occurred to me for days... I shot myself in the foot or maybe a little higher up, just below the lower back. Thanks for your brain power, Craigm -- Craigm ------------------------------------------------------------------------ Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381 View this thread: http://www.excelforum.com/showthread...hreadid=539850 |
Now not regonized as a built in Function, in some spreadsheets?
No problem. Glad it helped. I learned this the same way, so now you won't
encounter that error again either :-) Best wishes Harald "Craigm" skrev i melding ... I have been writing modules building towards automated charting. One of the test modules is named....ready for this....Now(). |
All times are GMT +1. The time now is 12:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com