How to open xls file?

Vba - open dbf file and save as xls

  • I have several named .dbf files which are downloaded to a folder each month. The names are always different. However I am wanting to write a macro that will open each file and close the file saving it as a .xls file instead of dbf. I have the macro written to open the files but am stuck on closing and saving as .xls. Many Laureen

  • Answer:

    Laureen, I assume you are in Excel 2003 or earlier - since I don't believe2007 and later support DBF. In that case s = ActiveWorkbook.Name s = Left(s,len(s) - 4) ActiveWorkbook.SaveAs fileName:="C:\Myfolder\" & s & ".xls", FileFormat:=xlWorkbookNormal

Miningco.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.