Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 7th, 2006, 10:38 PM
Authorized User
 
Join Date: Sep 2006
Location: , , Australia.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Export version

Hey everyone, i am still a beginner using VBA and i have a problem

when i export a table to excel it saves it as a 5.0/95 Workbook
is there anyway to make it output as the current version?

this is my code:

Function funcExport(strTableName, strFileName As String)
On Error GoTo funcExport_Err

    ' Exports list to file
       DoCmd.OutputTo acTable,strTableName, "MicrosoftExcel*.xls)", _
        strFileName, False, "", 0


funcExport_Exit:
    Exit Function

funcExport_Err:
    MsgBox Error$
    Resume funcExport_Exit

End Function

I have also tried "MicrosoftBiff8(*.xls)"

any help would be much appreciated

Reply With Quote
  #2 (permalink)  
Old September 8th, 2006, 06:39 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Try this:

DoCmd.OutputTo acOutputTable, strTableName, acFormatXLS, strFileName

False is the default for AutoStart, so not needed.
Likewise for TemplateFile and Encoding


This should use the version of Office installed on the PC.

Did this help?


mmcdonal
Reply With Quote
  #3 (permalink)  
Old September 10th, 2006, 06:03 PM
Authorized User
 
Join Date: Sep 2006
Location: , , Australia.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks heaps for the reply, but it doesn't seem to be working
... i mean it all works fine but is still outputting as a 5.0/95 workbook....

would it have anything to do with the file name?



Reply With Quote
  #4 (permalink)  
Old September 11th, 2006, 06:19 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What version of Excel do you have installed on the machine, and what version of Access?


mmcdonal
Reply With Quote
  #5 (permalink)  
Old September 11th, 2006, 05:51 PM
Authorized User
 
Join Date: Sep 2006
Location: , , Australia.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Both 2002

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oh! Another Version mike_remember ASP.NET 3.5 Basics 3 September 18th, 2007 09:51 AM
Passwords from version 1 to version 2 Maxxim BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 February 6th, 2007 06:49 PM
Which version UNCLEBENZ Visual C++ 1 November 2nd, 2005 05:39 PM



All times are GMT -4. The time now is 07:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.