H
Huff
Hi
I'm trying to run the following code in an Access function in order to
run an Excel macro. The problem I have is that I wish to close the
excel workbook but with changes saved. If I add in the line
'objExcel.Save' before the close command it throws errors saving do you
want to replace 'resume.xla'. 'objExcel.Workbooks.Save' doesn't seem to
work either.
How can I get the workbook to close with changes saved?
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open ("C:\[file path and name here].xls")
objExcel.Visible = True
objExcel.Run "Update"
objExcel.Workbooks.Close
objExcel.Quit
Thanks in advance!
Doug
I'm trying to run the following code in an Access function in order to
run an Excel macro. The problem I have is that I wish to close the
excel workbook but with changes saved. If I add in the line
'objExcel.Save' before the close command it throws errors saving do you
want to replace 'resume.xla'. 'objExcel.Workbooks.Save' doesn't seem to
work either.
How can I get the workbook to close with changes saved?
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open ("C:\[file path and name here].xls")
objExcel.Visible = True
objExcel.Run "Update"
objExcel.Workbooks.Close
objExcel.Quit
Thanks in advance!
Doug