Hey all,

Having a little problem trying to save one of the sheets as a .DBF DBase IV file. I can open a dBase into Excel and change the data as I choose, just fine. However when trying to save that sheet back into .DBF format, I am having some trouble.

When manually saving as .DBF, a prompt pops up asking that excel data format may not be preserved. After yes is answered, the saved file works fine...

The code I am using is this...

vb Code:
  1. Application.DisplayAlerts = False
  2. Dim gisSource As String
  3. gisSource = lblGISData.Caption
  4. Application.ScreenUpdating = False
  5. Dim oBook As Workbook
  6. Set oBook = Application.Workbooks.Add
  7. Application.SheetsInNewWorkbook = 1
  8. oBook.SaveAs gisSource
  9. Workbooks("myBook.xls").Activate
  10. Workbooks("myBook.xls").Worksheets("tempGISData").Activate
  11. Dim splicedName As String
  12. splicedName = spliceFileNameEnd3(gisSource)
  13. Worksheets("tempGISData").Copy Before:=Workbooks(splicedName).Sheets(1)
  14. Workbooks(splicedName).Sheets("Sheet1").Delete
  15. Workbooks(splicedName).Save
  16. Workbooks(splicedName).Close (False)
  17. Application.ScreenUpdating = True
  18. Application.DisplayAlerts = True