Hello,
Trying to open an Excel worksbook from Access, but I don't want Excel to open it up with Automatic Calc mode on. Excel object won't let me set calculation mode to manual or automatic unless I have workbook open. So I open a temporary workbook, set calc mode to manual, then try to open the real workbook. But it still keeps auto calc mode on. Suggestions?
Here's my current code:
Trying to open an Excel worksbook from Access, but I don't want Excel to open it up with Automatic Calc mode on. Excel object won't let me set calculation mode to manual or automatic unless I have workbook open. So I open a temporary workbook, set calc mode to manual, then try to open the real workbook. But it still keeps auto calc mode on. Suggestions?
Here's my current code:
Code:
Set gobjExcel = CreateObject("Excel.Application")
gobjExcel.Visible = True
Set gobjBook = gobjExcel.Workbooks.Open("C:\Users\Cedar\Desktop\ManualCalc.xlsx", False, False)
gobjExcel.Calculation = -4135 'xlManual
gobjBook.Close
Set gobjBook = gobjExcel.Workbooks.Open(sFullFileName, False, False)
Set gobjSheet = gobjBook.ActiveSheet