Specify SaveAs Programmatically

  • Thread starter Thread starter Alan CM
  • Start date Start date
A

Alan CM

I am launching an Excel spreadsheet from Access using
Workbook.Add("example.xls").

The workbookname shows example1.xls and when I hit save, I get
prompted with a SaveAs dialog box. It wants to put example1.xls in "My
Documents".

I want to programmatically set the name and directory. When the SaveAs
box opens, I want the user to just hit OK and have it properly named
and in the correct directory.

An example name would be "1001_033104.xls" (with 1001 being a company
number and the rest being the date) and the directory will be
"O:\FILES\"

Any ideas?
 
Hi
why don't you use just simply
Activeworkbook.SaveAs Filename:="myfilename.xls"

without ever showing the dialog
 
Back
Top