Code creates an old version

  • Thread starter Thread starter Dion
  • Start date Start date
D

Dion

I use the following code to open a Monarch Application
from Access, a Project file in Monarch, and create an
Excel spreadsheet with the results from the filter set in
Monarch. The problem I have is when it creates the
spreadsheet, it creates a version 2.1 spreadsheet rather
than a later version. I am using Office Pro 2000. Any
ideas on how (or even if) I could go about setting the
code to create a newer version of a spreadsheet? Any help
is appreciated.

Public Function MonarchRun()
On Error GoTo Err_monarchrun

Set MonarchObj = CreateObject("Monarch32")
MonarchObj.SetProjectFile ("G:\GROUPS\EVERYONE\Dormant
Accounts\DDADormant.prj")
MonarchObj.ExportTable ("G:\GROUPS\EVERYONE\Dormant
Accounts\DDADormants.xls")
MonarchObj.CloseAllDocuments
MonarchObj.SetProjectFile ("G:\GROUPS\EVERYONE\Dormant
Accounts\SAVDormant.prj")
MonarchObj.ExportTable ("G:\GROUPS\EVERYONE\Dormant
Accounts\SAVDormants.xls")
MonarchObj.CloseAllDocuments
MonarchObj.Exit
Set MonarchObj = Nothing


Exit_monarchrun:
Exit Function

Err_monarchrun:
MsgBox Err.Description
Resume Exit_monarchrun
 
The Excel file is created by your Monarch application (whatever it is), NOT
Access so I think you are more likely to get answers from a Monarch
newsgroup or Monarch Web site rather than here.

Perhaps, your Monarch software is old and the default Excel format used for
export is of version 2.1.
 
Back
Top