View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Martin Brown Martin Brown is offline
external usenet poster
 
Posts: 230
Default Recovered file has "File format is not valid" error

OssieMac wrote:
Try developing your application entirely by saving in xl2007 macro enabled
format and then save as xl97-2003 format when finished.


Or better develop under the stable environment of xl2003 and move it to
XL2007 when it is already working.

I have experienced the problem you describe (usually due to code errors) but
have been able to recover better if saved in xl2007 format. (There is still
no substitute for frequently Saving As and creating versions of your project
and do this just before running the code to test. Also Debug - Compile
before running the code)

You should note that saving in the earlier version format does not limit the
use of functions and code etc to the earlier version. I have found that at
least some, if not all, xl2007 functions and code will still work while
opened in xl2007 and saved in xl97-2003 format.

XL2007 does provide a warning message when saving in the earlier version but
that does not prevent functions and code pertaining only to xl2007 from being
used. However, they fail when the workbook is opened and run in the earlier
version.


Developing under XL2003 avoids this gotcha too. XL2007 is fragile and/or
slow if you are doing the wrong sorts of things. I have never had it
lose a file to "format not valid" yet but there is always a first time.

Regards,
Martin Brown