Hi Brian,
Thanks for the code, but I want to open, adjust,save and close the (downloaded) wedstrijd.xls from the MSAccess db prior to the import of the data in the wedstrijd.xls
This piece of code needs some checking (see previous post)
VB Code:
Private Function change_xls() Dim oApp As Object Dim File As String Dim xlsheet File = Application.CurrentProject.Path & "\wedstrijd.xls" Set oApp = CreateObject("Excel.Application") On Error Resume Next oApp.Visible = True oApp.Workbooks.Open Filename:=File Set xlsheet = oApp.Application.activeworkbook.sheets("wedstrijd") With xlsheet .range("C:C").NumberFormat = "dd/mm/yyyy" End With oApp.SaveAs Filename:=File ' Doesn't work oApp.Quit 'doesn't work End Function




Reply With Quote