Proper exit of Excel template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • juster21
    New Member
    • Feb 2008
    • 24

    Proper exit of Excel template

    I am opening a template, populating it with data, doing a SaveAs for the new workbook. Then I do a Process.Start(S avedFile) to open the saved workbook. The problem I have is that the template opens when the saved file opens.
    What am I doing wrong?
    Code:
     If ReportDirectoryExists(ReportFolder) = False Then
                    MessageBox.Show("Could not save report successfully", "Error Saving", MessageBoxButtons.OK, MessageBoxIcon.Information)
                Else
                    xlWorkbook.SaveAs(strSavedFile, Excel.XlFileFormat.xlOpenXMLWorkbook)
                    xlApp.xlWorkbook.Close()
                    xlApp.Quit()
                End If
    This is a sample of the end of the code. I can provide more if needed.
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    juster21, can you include your Process.Start() code?

    Comment

    Working...