0 Replies Latest reply: May 15, 2014 9:52 AM by yesb _ RSS

    Cannot open Lookup  file errorr - vb code

    yesb _

      Hi

        I had a strange problem.I m using two models the output of first model is look up for second model.

      I m getting  error 'support.xls is either missing or invalid. From the Table Menu choose Data/External Lookups... to select a new data source for the offending lookup.'[/b]

      Its working fine if I run it from command prompt.

       

      here is the code :

      openfile = MonarchObj.SetReportFile(App.Path & "input-files" & file1, False)

      If openfile = True Then

      openmod = MonarchObj.SetModelFile(App.Path & "monarch-filesCurMnthData-support.mod")

      If openmod = True Then

      MonarchObj.ExportTable (App.Path & "     emp-filessupport.xls")

       

      'MonarchObj.CloseAllDocuments

       

      openfile = MonarchObj.SetReportFile(App.Path & "input-files" & file1, False)

      If openfile = True Then

      openmod = MonarchObj.SetModelFile(App.Path & "monarch-filesCurMnthData.mod")

      If openmod = True Then

      MonarchObj.ExportTable (App.Path & "     emp-filesoutput.xls")

       

      whats wrong with my code?

       

      Thanks inadvance