Excel 2000 - Files corrupt after saving via VBA

R

Raymond Allan

Hi,

I have a sheet which contains around 12 product lines with many rows
of data for each product line, I have code which extracts each product
line with the appropriate data to a seperate sheet, each sheet is then
moved to a new book and the new workbook is saved as the product line
number, the new workbook is then closed and the only workbook left
open at the end is the original one used, the end result is that all
files created will not open correctly in Excel 2000 or 97, the file
opens then a cannot open at memory address ??? error appears, the
files open Ok in Excel XP

Using the same code in Excel 97 does not produce any errors and all
files created are fine, it is not an option for me to go back to Excel
97

A manual workaround for the above is not to close the workbooks after
saving, when the code has finished I manually save the first file
created, close down Excel and select YES to saving all opened files,
all files are then Ok when opened in Excel 2000 or 97 but I do not
wish to do this each time I run this program

In another project using Excel 2000 with virtually the same code, no
errors occur with the created files, same steps as above with the
exception that the workbooks are automatically e-mailed to suppliers
and all files are fine

Any help on this would be greatly appreciated as this is an integral
part of my job
 

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