ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Disable Quick Save & Save As (https://www.excelbanter.com/excel-discussion-misc-queries/162511-disable-quick-save-save.html)

L Weber

Disable Quick Save & Save As
 
I have found a string (below) to put into M.V.B. that works great for this.
When I click over to the excel file it does not allow me to Q.Save or
File/Save as€¦.. But now I cannot save the file with the new macro because I
have disabled that function? I am a newbie to M.V.B. but this seems like
some strange Catch 22 situation€¦. Please help if possible.


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
End Sub



--
L Weber

Mike H

Disable Quick Save & Save As
 
Open the workbook with macros disabled and enter the code and save.

"L Weber" wrote:

I have found a string (below) to put into M.V.B. that works great for this.
When I click over to the excel file it does not allow me to Q.Save or
File/Save as€¦.. But now I cannot save the file with the new macro because I
have disabled that function? I am a newbie to M.V.B. but this seems like
some strange Catch 22 situation€¦. Please help if possible.


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
End Sub



--
L Weber


L Weber

Disable Quick Save & Save As
 
Mike,
That was it... Thanks a bunch... Now next question How do I stop
the "XXX.XLS is read only to save a copy.........." It does not allow me to
do this but I would like to get rid of the pesky dialougue box. Thanks a
bunch for your help......


--
L Weber


"Mike H" wrote:

Open the workbook with macros disabled and enter the code and save.

"L Weber" wrote:

I have found a string (below) to put into M.V.B. that works great for this.
When I click over to the excel file it does not allow me to Q.Save or
File/Save as€¦.. But now I cannot save the file with the new macro because I
have disabled that function? I am a newbie to M.V.B. but this seems like
some strange Catch 22 situation€¦. Please help if possible.


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
End Sub



--
L Weber


Gord Dibben

Disable Quick Save & Save As
 
Application.DisplayAlerts = False

'code to run here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Wed, 17 Oct 2007 14:35:02 -0700, L Weber
wrote:

Mike,
That was it... Thanks a bunch... Now next question How do I stop
the "XXX.XLS is read only to save a copy.........." It does not allow me to
do this but I would like to get rid of the pesky dialougue box. Thanks a
bunch for your help......



Alan

Disable Quick Save & Save As
 
Not sure what you're trying to achieve here but if it's to prevent
unauthorised copying of the file, whilst it will work it's not at all
secure. All the user has to do is what Mike H suggested, ie open the file
with macros disabled, then they can save as they please.
You can prevent uninformed casual users from doing this, but even with those
you need to be far more devious. No matter how devious you are you cannot
prevent anyone with relatively little knowledge and the will to do so from
circumventing your efforts, Excel security is not its strong point.
Regards,
Alan.
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Application.DisplayAlerts = False

'code to run here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Wed, 17 Oct 2007 14:35:02 -0700, L Weber

wrote:

Mike,
That was it... Thanks a bunch... Now next question How do I stop
the "XXX.XLS is read only to save a copy.........." It does not allow me
to
do this but I would like to get rid of the pesky dialougue box. Thanks a
bunch for your help......




L Weber

Disable Quick Save & Save As
 
Thans Gord I will tray it out today.
--
L Weber


"Gord Dibben" wrote:

Application.DisplayAlerts = False

'code to run here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Wed, 17 Oct 2007 14:35:02 -0700, L Weber
wrote:

Mike,
That was it... Thanks a bunch... Now next question How do I stop
the "XXX.XLS is read only to save a copy.........." It does not allow me to
do this but I would like to get rid of the pesky dialougue box. Thanks a
bunch for your help......




L Weber

Disable Quick Save & Save As
 
Thanks to Both Alan and Gord. You have solved this issue for me!
--
L Weber


"L Weber" wrote:

Thans Gord I will tray it out today.
--
L Weber


"Gord Dibben" wrote:

Application.DisplayAlerts = False

'code to run here

Application.DisplayAlerts = True


Gord Dibben MS Excel MVP

On Wed, 17 Oct 2007 14:35:02 -0700, L Weber
wrote:

Mike,
That was it... Thanks a bunch... Now next question How do I stop
the "XXX.XLS is read only to save a copy.........." It does not allow me to
do this but I would like to get rid of the pesky dialougue box. Thanks a
bunch for your help......





All times are GMT +1. The time now is 05:31 PM.

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