View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Brian Young Brian Young is offline
external usenet poster
 
Posts: 10
Default SAveAs worksheet

Hi

Thanks for the support but ....

Nope, not working for me. I did not have a preface to teh SaveAs. But even
when I do use ActiveWorksheet.SaveAs it still returns the same messages. I am
only interested in saving teh current worksheet to the text file format.
Maybe there is nother approach I can't think of ? or a way to configure th
emessages in general not to appear ?!?!

"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