11 Replies Latest reply: May 15, 2014 10:11 AM by livens _ RSS

    Monarch 11, exportTable function not working...

    livens _

      We have just had a few users upgraded to Monarch 11 and have an issue with the exportTable function in VBA. This has been working in versions 7 through 10 for years.


      We have automated running a text file through monarch and importing it into an Access database. Here is part of the code:


      Dim monarchObj As Object

      Dim monarchMod As Boolean, monarchRep As Boolean


      Set monarchObj = CreateObject("Monarch32")


      monarchRep = monarchObj.SetReportFile(repPath, False)

      If monarchRep Then


        monarchMod = monarchObj.SetModelFile(modPath)

        If monarchMod Then


          monarchObj.ExportTable Application.CurrentProject.Path & "\Temp.mdb"


          err.Raise 111, , "Error setting the Model file."

        End If


        err.Raise 222, , "Error setting the Report file."

      End If[/CODE]


      With version 11 the Temp.mdb is not being exported. No errors, and running the code line by line it is being executed. We have tried chaning it to export a .xls file, and tried using jetExportTable with the same results.


      Has the Monarch 11 programming syntax changed? Any ideas as to why the exportTable function is not doing anything?





        • Monarch 11, exportTable function not working...
          livens _

          Also I just tried to have that user add code to make Monarch create a log file so I could see what is happening from Monarch's point of view:


          monarchObj.setlogfile Application.CurrentProject.Path & "\logFile.txt", 0[/CODE]


          This produced the following error:


          ERROR -2147023170 - Automation error

          The remote procedure call failed.[/CODE]


          After clicking OK on that error, every line thereafter that used the Monarch object produced this error:


          462 - The remote server machine does not exist is or is unavailable[/CODE]


          Possibly after the first error Monarch crashed or became unresponsive, or the VBA object itself became unuseable.


          Can someone with Monarch 11 and Access 2003 try a simple subroutine to open Monarch and run a report through a model and export it?