Microsoft KB Archive/123970

{|
 * width="100%"|

"OLE Automation Run-time Error 440" When Displaying Time

 * }

Q123970

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Project for Windows, version 4.0

-

SYMPTOMS
When you use the Visual Basic, Applications Edition, Time function to display the current system time, you may receive the following error message:

Run-time error '440':

OLE Automation error

CAUSE
The Time function is unable to convert the system time using the settings that are specified in the International Settings in Control Panel. This problem will occur if the following entries are missing from the [intl] section of the WIN.INI file:

sShortDate=M/d/yy

sLongDate=dddd', 'MMMM' 'd', 'yyyy

sLanguage=enu

sCountry=United States

WORKAROUND
To work around this problem, add the following line to the [intl] section of the WIN.INI:

sShortDate=M/d/yy

sLongDate=dddd', 'MMMM' 'd', 'yyyy

sLanguage=enu

sCountry=United States You can also force the correct setting to be written to the [intl] section by making certain changes in Control Panel. To add the appropriate settings, use the following steps:


 * 1) In Windows Control Panel, double-click the International icon.
 * 2) In the Date Format section, choose the Change button.
 * 3) In the Short Date Format section, choose the Change button. Select (put an x in) the Day Leading Zero and Month Leading Zero check boxes.

Additional query words: xl5 prj4 "run-time error 440"

Keywords :

Issue type :

Technology : kbExcelSearch kbExcel500 kbProjectSearch kbExcel500c kbProject400