3 Replies Latest reply: May 15, 2014 9:52 AM by RalphB _ RSS

    Open multiple reports using VBA

    MonarchUser _

      I am trying to open mutiple text files and export it as one single dbf file using VBA. Any ideas how this can be done?

        • Open multiple reports using VBA
          MonarchUser _

          I am trying to open mutiple text files and export it as one single dbf file using VBA. Any ideas how this can be done?

          • Open multiple reports using VBA
            RalphB _

            MonarchUser

             

            Yes, it can be done as long as the files are similar in layout and only one model is used.

             

            This would be a sample script:

             

            openfile = SetReportFile(stringReportfile1,true)

            openfile = SetReportFile(stringReportfile2,true)

            openfile = SetReportFile(stringReportfile3,true)

             

            repeat this until you open all your reports.

             

            Next you would attach your model file.  You could attach your model file after you open your first report but it is up to you.

             

            openmod= SetModelFile(stringModelFile)

             

            Next you would export your report.  If you have the Pro version of Monarch, you could use the JetExportTable or JetExportSummary Method depending if you are exporting a table or summary.  Otherwise you have to use the ExportTable or ExportSummary Method.

             

            HTH

             

            Ralph

            • Open multiple reports using VBA
              RalphB _

              MonarchUser

               

              Yes, it can be done as long as the files are similar in layout and only one model is used.

               

              This would be a sample script:

               

              openfile = SetReportFile(stringReportfile1,true)

              openfile = SetReportFile(stringReportfile2,true)

              openfile = SetReportFile(stringReportfile3,true)

               

              repeat this until you open all your reports.

               

              Next you would attach your model file.  You could attach your model file after you open your first report but it is up to you.

               

              openmod= SetModelFile(stringModelFile)

               

              Next you would export your report.  If you have the Pro version of Monarch, you could use the JetExportTable or JetExportSummary Method depending if you are exporting a table or summary.  Otherwise you have to use the ExportTable or ExportSummary Method.

               

              HTH

               

              Ralph