Nirmal Singh Guest
|
Posted: Wed Jan 05, 2005 11:17 am Post subject: #NAME? Error with Excel |
|
|
I am having a problem with an application that uses the Office97 server
components
excelApp.Cells.Item[2,13]:=EncodeDate(2003,12, ;
excelApp.Cells.Item[2,14]:=EncodeDate(2003,12,10);
excelApp.Cells.Item[2,15]:='=NetWorkDays(M2,N2)';
The first two lines simply insert these dates into cells M2 and N2.
The next line should return the Working days between these dates (in
cell O2).
The procedure executes without any error, but when I open the Excel
Workbook cell O2 contains #NAME?, althogh the formula bar shows the
correct formula. If I then select cell O2 and press ENTER I get the
correct value (3).
I have also tried the following with the same results:
excelApp.Cells.Item[2,15].Select;
excelApp.ActiveCell.Formula:='=NetWorkDays(M2,N2)';
Any suggestions would be appreciated.
Nirmal Singh
|
|