LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How can I know if Excel supports the fileformat constant?

My Excel version is Excel 2003. I tried the below code, and get a run-time
error.
ActiveWorkbook.SaveAs "C:\test.txt", xlTextMSDOS ' Error,
Err.Number=1004

I tested some fileformat constants, some are ok and some do not work.
ActiveWorkbook.SaveAs "C:\test.txt", 21 ' Error,
Err.Number=1004
ActiveWorkbook.SaveAs "C:\test.txt", xlCSVMSDOS ' Error,
Err.Number=1004
ActiveWorkbook.SaveAs "C:\test.txt", xlCurrentPlatformText 'OK
ActiveWorkbook.SaveAs "C:\test.txt", xlCSV 'OK

I donot know why. I guesss the reason is the environment on my computer. My
question is:
How can I know if Excel supports the fileformat constant before I use it?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Using FileFormat:=xlText [email protected] Excel Discussion (Misc queries) 0 March 26th 08 04:02 PM
What hyperlink method if any supports target rename? [email protected] Links and Linking in Excel 1 October 4th 07 12:13 PM
Fileformat XLText JeepNC Excel Programming 1 February 14th 05 06:38 PM
Excel 2004 no longer supports SetData appleEvent steveL Excel Programming 0 January 13th 05 08:13 PM
Pocket Excel supports only some functions Jon Grieve Excel Programming 2 December 3rd 03 12:59 PM


All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"