Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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...... |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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...... |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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...... |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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...... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable save | Excel Discussion (Misc queries) | |||
Disable save | Excel Discussion (Misc queries) | |||
Disable save | Setting up and Configuration of Excel | |||
Disable save | Setting up and Configuration of Excel | |||
Disable "Save As" Option | Excel Discussion (Misc queries) |