A
Annoyed Accountant
I've seen several threads hint at this, but I can't seem to get any of them
to work. I am downloading data from another source and importing it into
Access. The problem is, I can only save the original data as a .dat file.
This .dat file will open in Excel just fine, but I was hoping there was a way
to bypass manually opening excel and convert the file to .xls format for
import into Access using transferspreadsheet.
The below code (from another post) will open an excel file and save it just
fine, but how can I tweak this to convert my .dat to .xls so all of my
transferspreadsheet commands will work. (I have a huge number of these
commands, so an easy fix would be great) Thank you.
Private Sub start_Click()
Dim appExcel As Object
Dim workBook As Object
Dim workSheet As Object
Dim s_period As String
Set appExcel = GetObject("C:\H064.xls")
appExcel.Application.Visible = True
appExcel.Parent.Windows(1).Visible = True
appExcel.Application.DisplayAlerts = False
appExcel.Application.Save
appExcel.Application.DisplayAlerts = True
appExcel.Application.Quit
Set workSheet = Nothing
Set workBook = Nothing
Set appExcel = Nothing
to work. I am downloading data from another source and importing it into
Access. The problem is, I can only save the original data as a .dat file.
This .dat file will open in Excel just fine, but I was hoping there was a way
to bypass manually opening excel and convert the file to .xls format for
import into Access using transferspreadsheet.
The below code (from another post) will open an excel file and save it just
fine, but how can I tweak this to convert my .dat to .xls so all of my
transferspreadsheet commands will work. (I have a huge number of these
commands, so an easy fix would be great) Thank you.
Private Sub start_Click()
Dim appExcel As Object
Dim workBook As Object
Dim workSheet As Object
Dim s_period As String
Set appExcel = GetObject("C:\H064.xls")
appExcel.Application.Visible = True
appExcel.Parent.Windows(1).Visible = True
appExcel.Application.DisplayAlerts = False
appExcel.Application.Save
appExcel.Application.DisplayAlerts = True
appExcel.Application.Quit
Set workSheet = Nothing
Set workBook = Nothing
Set appExcel = Nothing