How can I save my sheet in macro

F

FSt1

hi,
try this....
just before the save, add this line...

Application.DisplayAlerts = false

just after the save, add this line...

Application.DisplayAlerts = true

regards
FSt1
 
S

SAM SEBAIHI

I am trying to save the sheet in a macro, the problem is that, the code
start to save the sheet, it will prompt me with 2 prompts: I would like to
bypass those prompt so it will save atomaticall without me pressing the OK
keys.
These 2 messages are:
1- The file book1 already exist....( I want to always overwirte it and by
pass it)
2- The follwing feature from your book1 will not be saved in the web do you
want to continue saving... ( I want to always overwrite this)

This is the code. What do I need to change to by passs those above 2
messages so it will by pass them without me pressing the OK button?

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\DAD\My Documents\Book1.mht", FileFormat:=
_
xlWebArchive, CreateBackup:=False

Thank you in advance
 
S

SAM SEBAIHI

WOW!!!

Thank you thank you and thank you.
It worked like a charm
=====================================
 
Top