T
Tim
Hi Everybody,
I have written a bit of code to open an excel file from word and I wish to
work with it a bit (in particular, I wish to set a named range) from there.
When I finish working with it, I want to save the file. However, the manner
in which I open the file opens it as a Read-Only type so that I cannot save
the file with the same name. Here is what I have so far:
Dim excelApplication As Excel.Application
Set excelApplication = CreateObject("Excel.Application")
excelApplication.Visible = True
excelApplication.Application.Workbooks.Open (excelLocation)
excelApplication.Application.Dialogs(xlDialogDefineName).Show
' excelApplication.Application.ActiveWorkbook.Save <-- this is the "bad" part
excelApplication.Application.Quit
For now, assume excelLocation is a reference to a valid string.
Thank you all for your time,
Tim
I have written a bit of code to open an excel file from word and I wish to
work with it a bit (in particular, I wish to set a named range) from there.
When I finish working with it, I want to save the file. However, the manner
in which I open the file opens it as a Read-Only type so that I cannot save
the file with the same name. Here is what I have so far:
Dim excelApplication As Excel.Application
Set excelApplication = CreateObject("Excel.Application")
excelApplication.Visible = True
excelApplication.Application.Workbooks.Open (excelLocation)
excelApplication.Application.Dialogs(xlDialogDefineName).Show
' excelApplication.Application.ActiveWorkbook.Save <-- this is the "bad" part
excelApplication.Application.Quit
For now, assume excelLocation is a reference to a valid string.
Thank you all for your time,
Tim