Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the following code in a COM based application:
excelApp.Cells.Item[2,13]:=EncodeDate(2003,12,8); 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error: "Excel encountered an error and had to remove some formatti | Excel Discussion (Misc queries) | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
I have Error 1919 Error Configuring ODBC dataSource Database | Excel Discussion (Misc queries) | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming |