#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default SAveAs worksheet

Hello Gentlemen

Many thanks to JL as I now have a solution !!! your help is appreciated.


Brian

"Brian Young" wrote:

Hello JL

When I remove the xlText format it works, however, when the text file is
opened is contains lots of unwanted characters so I need to format the output
file. As soon as a FileFormat is added then the questions are asked. The
output file has each line formatted to 80 characters so that it can then be
imported into another application.

Any suggestions how to get around this ?

Cheers

"JLatham" wrote:

Brian,
No, it works for me and I've tried it while just using the filename without
the FileFormat specified and with it specified as xlText

I do get the alert after that when closing the file, but that could be done
away with by doing the same thing with it as

Application.DisplayAlerts=False
ActiveWorkbook.SaveAs Filename:="c:\ptp\results.mea", FileFormat:=xlText
ActiveWorkbook.Close

So I'm not really understanding why you're getting the alert.
I notice in your code example you only used "SaveAs" - are you prefacing
that with ActiveWorkbook.SaveAs or ActiveSheet.SaveAs
??

Although it works both ways for me, again without prompts.

"Brian Young" wrote:

Hi JL

Unfortunately I had already tried this but with no success. Any other
suggestions ??? thx

"JLatham" wrote:

Application.DisplayAlerts = False
...your save as code here
Application.DisplayAlerts = True

"Brian Young" wrote:

I have a macro that reads in, processes data & places it onto a presentation
worksheet. The following line allows ONLY the worksheet to be saved which is
what I want. My problem is that I get the 2 messages appearing & I want to
switch them off so that filing of the worksheet is automated.

Any suggestions ??

SaveAs Filename:="c:\ptp\results.mea", FileFormat:=xlText

Message 1 :"Do you want to save changes you made to results.mea"
&
Message 2 :"The file Results.mea already exists. Do you want to overwrite ?

Using - Application.DisplayAlerts = False does not work.

Brian

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
Search one worksheet for values in another worksheet? ClayShooters Excel Discussion (Misc queries) 1 July 4th 06 03:01 PM
Worksheet not showing up in VBE Kevin Vaughn Excel Worksheet Functions 3 June 12th 06 03:22 PM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


All times are GMT +1. The time now is 10:14 PM.

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

About Us

"It's about Microsoft Excel"