Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default save as text crashes

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.

"JLGWhiz" wrote:

With activeworkbook.workseets(sheet1)
I assume this was a typo on your part, but I thought Worksheets("Sheet1")
was the generic name for sheet 1 no matter what else you use for the public
name. Am I wrong?

"Janis" wrote:

I like this macro it does what I want and its easy to understand. It closes
book1.xls as the original. It saves two copies one as a text file. The
other one remains open. The only problem is on the one that remains open,
the new ssp....xls file, it renames (sheet1) as the Indesign....txt file.

Since I use sheet1 in the next macros to do some formatting, I got around
that by naming it as a collection.
With ActiveWorkbook.Worksheets(1)
instead of
With activeworkbook.workseets(sheet1)
But I wonder why it changes the name of the sheet to the name of the first
file that was saved. Its a little weird and it crashes I think more than
not. Maybe I am better off doing the save a different way?

thanks,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default save as text crashes

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

--
Regards,
Tom Ogilvy


"Janis" wrote:

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.

"JLGWhiz" wrote:

With activeworkbook.workseets(sheet1)
I assume this was a typo on your part, but I thought Worksheets("Sheet1")
was the generic name for sheet 1 no matter what else you use for the public
name. Am I wrong?

"Janis" wrote:

I like this macro it does what I want and its easy to understand. It closes
book1.xls as the original. It saves two copies one as a text file. The
other one remains open. The only problem is on the one that remains open,
the new ssp....xls file, it renames (sheet1) as the Indesign....txt file.

Since I use sheet1 in the next macros to do some formatting, I got around
that by naming it as a collection.
With ActiveWorkbook.Worksheets(1)
instead of
With activeworkbook.workseets(sheet1)
But I wonder why it changes the name of the sheet to the name of the first
file that was saved. Its a little weird and it crashes I think more than
not. Maybe I am better off doing the save a different way?

thanks,


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default save as text crashes

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.

"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"Janis" wrote:

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.

"JLGWhiz" wrote:

With activeworkbook.workseets(sheet1)
I assume this was a typo on your part, but I thought Worksheets("Sheet1")
was the generic name for sheet 1 no matter what else you use for the public
name. Am I wrong?

"Janis" wrote:

I like this macro it does what I want and its easy to understand. It closes
book1.xls as the original. It saves two copies one as a text file. The
other one remains open. The only problem is on the one that remains open,
the new ssp....xls file, it renames (sheet1) as the Indesign....txt file.

Since I use sheet1 in the next macros to do some formatting, I got around
that by naming it as a collection.
With ActiveWorkbook.Worksheets(1)
instead of
With activeworkbook.workseets(sheet1)
But I wonder why it changes the name of the sheet to the name of the first
file that was saved. Its a little weird and it crashes I think more than
not. Maybe I am better off doing the save a different way?

thanks,


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default save as text crashes

wait, if you are right, then why does the indesign.txt workbook name appear
on the sheet of the
ssp.xls workbook.

"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"Janis" wrote:

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.

"JLGWhiz" wrote:

With activeworkbook.workseets(sheet1)
I assume this was a typo on your part, but I thought Worksheets("Sheet1")
was the generic name for sheet 1 no matter what else you use for the public
name. Am I wrong?

"Janis" wrote:

I like this macro it does what I want and its easy to understand. It closes
book1.xls as the original. It saves two copies one as a text file. The
other one remains open. The only problem is on the one that remains open,
the new ssp....xls file, it renames (sheet1) as the Indesign....txt file.

Since I use sheet1 in the next macros to do some formatting, I got around
that by naming it as a collection.
With ActiveWorkbook.Worksheets(1)
instead of
With activeworkbook.workseets(sheet1)
But I wonder why it changes the name of the sheet to the name of the first
file that was saved. Its a little weird and it crashes I think more than
not. Maybe I am better off doing the save a different way?

thanks,


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default save as text crashes

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.

--
Regards,
Tom Ogilvy


"Janis" wrote in message
...
wait, if you are right, then why does the indesign.txt workbook name
appear
on the sheet of the
ssp.xls workbook.

"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"Janis" wrote:

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.

"JLGWhiz" wrote:

With activeworkbook.workseets(sheet1)
I assume this was a typo on your part, but I thought
Worksheets("Sheet1")
was the generic name for sheet 1 no matter what else you use for the
public
name. Am I wrong?

"Janis" wrote:

I like this macro it does what I want and its easy to understand.
It closes
book1.xls as the original. It saves two copies one as a text file.
The
other one remains open. The only problem is on the one that
remains open,
the new ssp....xls file, it renames (sheet1) as the Indesign....txt
file.

Since I use sheet1 in the next macros to do some formatting, I got
around
that by naming it as a collection.
With ActiveWorkbook.Worksheets(1)
instead of
With activeworkbook.workseets(sheet1)
But I wonder why it changes the name of the sheet to the name of
the first
file that was saved. Its a little weird and it crashes I think
more than
not. Maybe I am better off doing the save a different way?

thanks,



Reply
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
Excel crashes on save Dan Excel Discussion (Misc queries) 2 January 9th 08 08:02 PM
save as text crashes Janis Excel Programming 2 September 15th 06 06:35 PM
Excel crashes when trying to save. Ori Excel Discussion (Misc queries) 2 August 21st 06 12:11 AM
Excel randomly crashes during save as Toni Excel Discussion (Misc queries) 0 April 4th 06 04:51 PM
Save As... crashes Excel Deane Yang Excel Programming 2 October 3rd 03 03:53 PM


All times are GMT +1. The time now is 03:47 PM.

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

About Us

"It's about Microsoft Excel"