Setting Excel version in Access Basic

  • Thread starter Thread starter Guest
  • Start date Start date
It sounds like you're saying that if the user doesn't tell you which
version of spreadsheet you are about to link to, then just use the
default and hope that it works.

I don't know if it helps, but this took me less than a minute to find in
Excel VBA help, as one of the properties of the Workbook object:

FileFormat Property

See Also Applies To Example Specifics

Returns the file format and/or type of the workbook. Read-only
XlFileFormat.

XlFileFormat can be one of these XlFileFormat constants.
xlCSV, xlCSVMSDOS, xlCurrentPlatformText, xlDBF3, xlDIF, xlExcel2FarEast,
xlExcel4, xlAddIn, xlCSVMac, xlCSVWindows, xlDBF2, xlDBF4, xlExcel2,
xlExcel3, xlExcel4Workbook, xlExcel5, xlExcel7, xlExcel9795, xlHtml,
xlIntlAddIn, xlIntlMacro, xlSYLK, xlTemplate, xlTextMac, xlTextMSDOS,
xlTextPrinter, xlTextWindows, xlUnicodeText, xlWebArchive, xlWJ2WD1,
xlWJ3, xlWJ3FJ3, xlWK1, xlWK1ALL, xlWK1FMT, xlWK3, xlWK3FM3, xlWK4,
xlWKS, xlWorkbookNormal, xlWorks2FarEast, xlWQ1
xlXMLSpreadsheet


Seems to me that it would take a couple of lines of code simply to check
it's a kosher workbook format, translate to the outgoing version code,
and put that into the TransferSpreadsheet method.

Or am I missing something?

Tim F
 
Back
Top