ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I save my sheet in macro (https://www.excelbanter.com/excel-discussion-misc-queries/130117-how-can-i-save-my-sheet-macro.html)

FSt1

How can I save my sheet in macro
 
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

"SAM SEBAIHI" wrote:

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 a
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




SAM SEBAIHI

How can I save my sheet in macro
 
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 a
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



SAM SEBAIHI

How can I save my sheet in macro
 
WOW!!!

Thank you thank you and thank you.
It worked like a charm
=====================================
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

"SAM SEBAIHI" wrote:

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 a
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







All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com