VBA: Date/Time function reference


Posted by Jason Ramirez on January 16, 2002 9:24 AM

I did some VBA development to an Excel 97 workbook. I created an install package (setup.exe) making sure to include any DLL/OCX dependencies created by my VBA code and the execution of the installation package happens smoothly on a guinea-pig machine.

However when it gets to the following code, it bombs:

Dim strTime as String
Dim strDate as String
strTime = Time 'bombs here
strDate = Date 'bombs here too

It tells me "Compile Error: can't find object or library".

Anyone know what reference I need to have checked for this to work correctly, or have any idea why its telling me this?

Thanks,
Jason



Posted by Doug on January 16, 2002 9:55 AM

I've had similar problems before and each time it was due to the fact that an Add-In wasn't installed on the new machine. You might check on any dependecies to Add-Ins you have in the code such as references, etc. If there are none, I'd simply verify that each Add-In on the creator machine is also found on the guinea-pig machine.

Hope this helps.