SaveAs
Hi, I can't resolve problem how to save spreadsheet in any format: xls or xlsx.
I use office2007, but some of people in my office still use excel2003. They must decide
in which format save excel.
I wrote:
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
... and ...
xlApp.Dialogs(Excel.XlBuiltInDialog.xlDialogSaveAs).Show("xxx")
all is ok, default name is "xxx", but I'd like set default extension and I wrote:
xlApp.Dialogs(Excel.XlBuiltInDialog.xlDialogSaveAs).Show("xxx", Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel9795)
and here is problem, I got error.
How can I set default name, extension and location where I want save my file?
And a second question: how I can check which button was pressed in DialogBox?
In a SaveFileDialog I wrote:
"If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then"
but how check it in a xlApp.Dialogs?
Source is VB.net2005.
Regards, Jacek

