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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving worksheet as different file format

Status
Not open for further replies.

redwolfe

MIS
Jan 12, 2000
89
US
I created an Excel macro that displays a dialog box for a user to name and save a file. The syntax that I use is: Application.Dialogs(xlDialogSaveAs).Show<br>

<br>

After the file is saved, I want to use a macro command to convert the file to a DBF format. Is there a way to do this with a macro?
 
Why don't you just save it as a dbf the first time? If that option isn't available for you, you may need to install the converter. I currently run Office 2000 and have the ability to save as a DB2, DB3, or DB4. Perhaps, you could do an on-close that saves the file to a dbf. You can't convert an open file, but you can save-as. Maybe I need to know more?
 
I created an Excel macro that displays a dialog box for a user to name and save a file. The syntax that I use is: Application.Dialogs(xlDialogSaveAs).Show<br>
<br>
The user names the file according to the contents of that file at a given time. After the file is saved, I want to use a macro command to convert the file to a DB3 format and close the worksheet. My problem is that I don't know how to set up a macro that allows a user to name and automatically save a file in a DB3 format. We are using Excel '97.<br>

 
Try:<br>
<br>
Do<br>
fName = Application.GetSaveAsFilename<br>
Loop Until fName &lt;&gt; False<br>
ThisWorkBook.SaveAs Filename:=fName FileFormat:=xlDBF3<br>
<br>
<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top