help: Activesheet.save error with XL 2000

  • Thread starter Thread starter jasonsweeney
  • Start date Start date
J

jasonsweeney

I drafted a worsheet in XL 2002. Works fine.

I distributed it today. Most of the users use XL 2000.

At several different times, the worksheet saves itself for reasons that
arn't important here.

Apparently, the way I coded this causes a run-time error (1007?) in
Excel 2000.

I use:

Me.Save
ActiveWorksheet.Save

Both cause errors....one user had downloaded updates from XL and his
version ran my code fine. But I need to write a patch for the rest.
Please! Anybody have any help for me here?

Jason
 
Hi Jason

Give Thisworkbook.Save a whirl (as opposed to Activeworksheet), and see if it solves your problem

SuperJas.
 
There is still a problem. I have isolated the error to the line in cod
that attempts to save the open workbook in XL 2000. The line I
"Thisworkbook.Save" that causes the bug. In another place in the cod
I try to save some data in a new workbook which is opened by code an
then saved as "Activeworkbook.save". Same error occurs.

I get a "Error 1007". It says "cannot open file" (?) and says yo
can't have certain characters in the name of the file. I changed th
name of the file to a single word, and the same error comes back "yo
cannot have ":" in the file name. Problem is, there is no ":" in th
file name.

Again, there is no problem with the code in (A) XL 2002, or (B) XL 200
that has been regularly updated. I don't know which update is neede
to fix the problem. Alternatively, I can change the code.

Either way I need some help. The program has been distributed to abou
35 managers who are all waiting for me to fix it...
 
First,

The error is not "1007" but "1004". Also, there is more information i
the error message. Something about the file being "read-only".

Second, I found the following article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;199268&Product=xlw2K

re: tryign to save a workbook as text. I don't think I am trying t
save my workbook as text. Isn't the default just ".xls" (and thi
means not a text file???)? I just use the ThisWorkbook.Save as th
code.


I am also following up on whether the computers that are having th
problem are using Windows NT. There appears to be a this "read-only
bug if so:

http://support.microsoft.com/default.aspx?scid=kb;en-us;265103&Product=xl
 
In the end, I was unable to find the source of the error. In Both XL 9
and 2000, the VBA debugger flagged the "ThisWorkbook.Save", an
"Me.Save", and "Activesheet.Save" as the offending lines of code.

Based on the knowledgebase articles I posted above, I tested to see i
the systems had the NT bug. I did this by opening new spreadsheets an
writing simple macros that saved themselves with the code above.
Worked fine.

I also tested the VBA Password protect bug by removing all m
passwords. Did not solve the error.

I eventually had to remove all lines of code that attempted to save th
spreadhseet programically, and instead am forced to rely on the user t
save their work.....

Weird bug
 
Back
Top