save as text crashes

J

Janis

Maybe its okay, I just ran it again and it didn't crash. But I've noticed
the personal workbook gets corrupted a lot. I have to make sure that it
isn't a recovered one I'm working on. That seems to be when it crashes.

In any case, this macro I mentioned needs to save a text file. So I am in
the original file
and I have to save two files in order to get it to save a text file.
Otherwise it can't use saveas. It saves a text file names
indesigndate&time.txt. It also saves the original file as sspdate&time.xls.
This ssp...txt file has the name of the indesign...txt file as the first
sheet.

The original file closes unchaged. This new xls file is left open as I said
with the sheet1 name changed. I can still proceed with other process macros
by changing them to act on sheets(1) as a collection instead of using the
"sheet1" name because the name is no longer sheet1.

I wish I knew why my personal workbook keeps crashing. I think I need to
build in some error trapping. any suggestions are helpful.
 
T

Tom Ogilvy

Open a textfile in excel using File=>Open. Notice that there is only one
worksheet and it has the same name as the file. This is just the way excel
operates - a textfile has no provision for saving sheet names, formatting and
other stuff associated with a workbook.

Generally workbooks "crash" because our code does something it shouldn't
 
J

Janis

well in this case I think it is because it is saving as a mac text file. I"m
moving it to a pc to see if that improves it. Not that I couldn't be doing
something wrong but as you see the macro looks okay.
 
T

Tom Ogilvy

I forgot you are on a MAC. I was describing how it operates in Windows. If
it is different in a MAC, I can't speak to that. However, in the scenario
you descibe, when you save the original workbook as indesign.txt, then
sheet1 becomes indesign.txt to match the name of the file. When you then
save the indesign.txt workbook as ssp.xls (a workbook file, not a txt file),
then the first worksheet doesn't change back. This would be how it does it
in a PC and it sounds like it is the same for a MAC.
 

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