Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Excel file

Status
Not open for further replies.

kenguru

Programmer
May 14, 2004
173
RO
Hello,

I have an excel file, which i open with a common dialog box and then i write some things in it and i want to save it and close it.
It seems easy, but the problem is the excel generates a "resumes.xlw", and i don't know how to exclude this.
My code is the following (shorted):
dlg.ShowOpen
Workbooks.Open dlg.FileName

...
Set xlSheet = Worksheets.Add
xlSheet.Range("B" & 3).Value = xlSheet_adatok.Range("B" & 1).Value
...
...
Application.SaveWorkspace
Application.Quit
Unload Me

Thank you
 
in place of;

Application.SaveWorkspace

I suggest you try the .Save and .SaveAs methods; see VBA help.

HTH Hugh
 
I tried, and it creates that "resume.xlw" file, which is a problem because at the second running of the program it's asking to overwrite it. I don't need that question :(
 
'see VBA help' again

Application.SaveAs Filename:="MyFile.xls", FileFormat:=xlNormal

will save it as an .xls
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top