convert Microsoft Excel 5.0/95 to ms excel 2003

G

Guest

I have a database (mdb file) and when I export data to excel using the
command OutputTo, the database export and generates an excel file format
5.0/95.
I just asked in news group if is possible to export using the same method
(OutputTo) and they answer is not possible.

So, I would like to know, how can I save as or convert the excel file format
5.0/95 to ms excel 2003 (current format) via VBA and without asking if do you
want to overwrite...?

Thanks
 
D

Dave Peterson

Did you ask this question in an Access newsgroup?

If not, then that's where I'd try.

Well, if you don't get a good answer here.
 
G

Guest

I posted in access newsgroup, unfortunately I didn't get a good answer.
Also, I search in google and no answers...

I you have any idea, let me know. Some times just a suggestion to get a
solution

thanks,
jcp
 
D

Dave Peterson

I don't use Access.
I posted in access newsgroup, unfortunately I didn't get a good answer.
Also, I search in google and no answers...

I you have any idea, let me know. Some times just a suggestion to get a
solution

thanks,
jcp
 
G

Guest

You don't need to use access.
If you use vba and if you know how can convert, let me know.
thanks
jcp
 
P

Peter T

To change the file format look at SaveAs in help and its second argument.
Perhaps something like this (if the workbook has already been saved)

Dim wb As Excel.Workbook
Set wb = ActiveWorkbook
' if code is in Access qualify with a ref to the Excel.Application

wb.SaveAs wb.FullName, xlNormal

To prevent the "do you want to overwrite...?" precede the saveas with
Application.displayalerts = false
and reset to true when done.

If the workbook has never been saved, ie does not have a path, change

wb.FullName
to
sFileName

where sFileName = something like "C:\folder\myBook.xls"

If your VBA is in Access and you are not using Early Binding you'll need to
change the code along these lines

Dim wb As Object
Set wb = xlApp.ActiveWorkbook' or whatever workbook
wb.SaveAs wb.FullName, -4143 ' value of the xlNormal constant

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top