M
mohanamr
I am trying to export data from MS Access to MS Excel and then do some
caluclations. After exporting I open the excel object using MS Access
VBA and write inbuilt formula in a cell in the excel. When I open the
exported excel I could see the formula written in the excel cell, but I
could not see the calculated value in the cell. I could see some thing
like "#NAME?".
Later if I press "F2" on the cell and then press "enter" the formula
gets effect and the value gets displayed.
Can this be solved by VBA code?? When I open the exported excel sheet I
should be able to see the calucated values instead of the formula
alone.
Can anyone help me out in this.. Please treat this as very urgent!!!
The below line shows the line of code (formula) I used in MS Access VBA
to populate the cells:
..Worksheets(1).Range("B4", "B10").Formula = "=IF(P4=" & Chr(34) & "AD"
& Chr(34) & ",EDATE($D4,$F4-1),EDATE($D4,$F4))"
With Expectations,
Mohana
caluclations. After exporting I open the excel object using MS Access
VBA and write inbuilt formula in a cell in the excel. When I open the
exported excel I could see the formula written in the excel cell, but I
could not see the calculated value in the cell. I could see some thing
like "#NAME?".
Later if I press "F2" on the cell and then press "enter" the formula
gets effect and the value gets displayed.
Can this be solved by VBA code?? When I open the exported excel sheet I
should be able to see the calucated values instead of the formula
alone.
Can anyone help me out in this.. Please treat this as very urgent!!!
The below line shows the line of code (formula) I used in MS Access VBA
to populate the cells:
..Worksheets(1).Range("B4", "B10").Formula = "=IF(P4=" & Chr(34) & "AD"
& Chr(34) & ",EDATE($D4,$F4-1),EDATE($D4,$F4))"
With Expectations,
Mohana