Hi Matt,
Thanks for the response. However, i had already tried these approaches without success.
Set oXlApp = CreateObject("Excel.Application")
oXlApp.Visible = False
Set wb = oXlApp.Workbooks.Open(sFileName)
oXlApp.Calculation = xlCalculationManual
'oXlApp.ScreenUpdating = True
'oXlApp.Visible = True
sNow = Format(Now(), "dd-mmm-yy hh:mm:ss")
oXlApp.Worksheets("Menu").Range("rSelectedTime").V alue = sNow
oXlApp.SendKeys "%^{F9}" '1
oXlApp.Calculate '2
For Each Sheet In oXlApp.Worksheets '3
Sheet.Calculate
Next
Additionally, I had put the code in the workbook itself and used the
VB program to set a "flag" in a cell, so that the workbook_open method would check the flag and then execute the recalculation. Once again, when the workbook is opened manually the method executes and the workbook updates, but when opened by the
vb program the function executes but the calculation results in formula cells with #NAME?
thanks again.
j