M
Matthew Scheperle
I have part of my code below that opens the excel files, then runs a module
in the main spreadsheet. It runs correctly. I can add xl.quit and then
manually go open the file.
HOWEVER, when I try to open that same file using my code it stays hidden in
the background. I want the user to see the spreadsheet after it has done all
the formating, and other stuff to the file. It also creates a file called
BACKUP filename.xlsx which I would like to not have happen.
Ideas?
Dim xl As Object
Set xl = CreateObject("Excel.Application")
xl.Workbooks.Open filepath & "AppropAllotment2042.xlsm"
xl.Run "Module1.summarize", directory
xl.activeworkbook.Save
'xl.Quit
MsgBox directory ' This allows me to see the value assigned to directory.
Which shows the correct file path and file name.
in the main spreadsheet. It runs correctly. I can add xl.quit and then
manually go open the file.
HOWEVER, when I try to open that same file using my code it stays hidden in
the background. I want the user to see the spreadsheet after it has done all
the formating, and other stuff to the file. It also creates a file called
BACKUP filename.xlsx which I would like to not have happen.
Ideas?
Dim xl As Object
Set xl = CreateObject("Excel.Application")
xl.Workbooks.Open filepath & "AppropAllotment2042.xlsm"
xl.Run "Module1.summarize", directory
xl.activeworkbook.Save
'xl.Quit
MsgBox directory ' This allows me to see the value assigned to directory.
Which shows the correct file path and file name.