Hi,
I have some formulas and data which is shared for the users to get their
answers instantly. Is there any way not to allow users to save the excel
shared file if they make any changes. Is it possible if the users close the
file with some changes excel exit without prompting or saving??. i tried read
only, protect sheet etc. its of no use.
Thanks
Kevin

RE: saving excel file by GarysStudent

GarysStudent
Sun May 11 06:22:00 CDT 2008

Protect the cells that contain formulas and data that you want protected.
Even if a user saves the worksheet after making changes, the changes will not
be to protected material.
--
Gary''s Student - gsnu200785


"Kevin" wrote:

> Hi,
> I have some formulas and data which is shared for the users to get their
> answers instantly. Is there any way not to allow users to save the excel
> shared file if they make any changes. Is it possible if the users close the
> file with some changes excel exit without prompting or saving??. i tried read
> only, protect sheet etc. its of no use.
> Thanks
> Kevin
>

Re: saving excel file by Gord

Gord
Sun May 11 11:08:02 CDT 2008

Stick these in Thisworkbook module.

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

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

To save the workbook with this code you must disable events then save.

Sub disable()
Application.EnableEvents = False
End Sub

Save workbook at this point.

Re-enable events and no further saving will take place.

Sub enable()
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP


On Sat, 10 May 2008 22:54:01 -0700, Kevin <Kevin@discussions.microsoft.com>
wrote:

>Hi,
>I have some formulas and data which is shared for the users to get their
>answers instantly. Is there any way not to allow users to save the excel
>shared file if they make any changes. Is it possible if the users close the
>file with some changes excel exit without prompting or saving??. i tried read
>only, protect sheet etc. its of no use.
>Thanks
>Kevin


Re: saving excel file by Earl

Earl
Mon May 12 00:28:09 CDT 2008

Kevin,

Normally this is done with network permissions. If the users have only read access, they
won't be able to save the file over the original.
--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Kevin" <Kevin@discussions.microsoft.com> wrote in message
news:165230BC-8CAC-4342-A47D-7B9F52783E25@microsoft.com...
> Hi,
> I have some formulas and data which is shared for the users to get their
> answers instantly. Is there any way not to allow users to save the excel
> shared file if they make any changes. Is it possible if the users close the
> file with some changes excel exit without prompting or saving??. i tried read
> only, protect sheet etc. its of no use.
> Thanks
> Kevin
>



Re: saving excel file by Earl

Earl
Mon May 12 00:30:41 CDT 2008

Could a user not open the workbook with macros disabled, then be able to save his changed
copy?
--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Gord Dibben" <gorddibbATshawDOTca> wrote in message
news:nj5e249lmios5od1om50uta92dkv8e0nqg@4ax.com...
> Stick these in Thisworkbook module.
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> ThisWorkbook.Saved = True
> ThisWorkbook.Close
> End Sub
>
> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> Cancel = True
> End Sub
>
> To save the workbook with this code you must disable events then save.
>
> Sub disable()
> Application.EnableEvents = False
> End Sub
>
> Save workbook at this point.
>
> Re-enable events and no further saving will take place.
>
> Sub enable()
> Application.EnableEvents = True
> End Sub
>
>
> Gord Dibben MS Excel MVP
>
>
> On Sat, 10 May 2008 22:54:01 -0700, Kevin <Kevin@discussions.microsoft.com>
> wrote:
>
>>Hi,
>>I have some formulas and data which is shared for the users to get their
>>answers instantly. Is there any way not to allow users to save the excel
>>shared file if they make any changes. Is it possible if the users close the
>>file with some changes excel exit without prompting or saving??. i tried read
>>only, protect sheet etc. its of no use.
>>Thanks
>>Kevin
>



Re: saving excel file by Kevin

Kevin
Mon May 12 00:30:01 CDT 2008

Thank u Gord,
The first code is working fine, I am little confused about disabling &
enabling of events. Where to enable this pls help. Thanks in advance.
Kevin.

"Gord Dibben" wrote:

> Stick these in Thisworkbook module.
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> ThisWorkbook.Saved = True
> ThisWorkbook.Close
> End Sub
>
> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> Cancel = True
> End Sub
>
> To save the workbook with this code you must disable events then save.
>
> Sub disable()
> Application.EnableEvents = False
> End Sub
>
> Save workbook at this point.
>
> Re-enable events and no further saving will take place.
>
> Sub enable()
> Application.EnableEvents = True
> End Sub
>
>
> Gord Dibben MS Excel MVP
>
>
> On Sat, 10 May 2008 22:54:01 -0700, Kevin <Kevin@discussions.microsoft.com>
> wrote:
>
> >Hi,
> >I have some formulas and data which is shared for the users to get their
> >answers instantly. Is there any way not to allow users to save the excel
> >shared file if they make any changes. Is it possible if the users close the
> >file with some changes excel exit without prompting or saving??. i tried read
> >only, protect sheet etc. its of no use.
> >Thanks
> >Kevin
>
>

Re: saving excel file by Gord

Gord
Mon May 12 19:43:50 CDT 2008

Certainly Earl.

That is always an issue with code.

Only workaroiund for that is to render the workbook useless if users disable
macros.


Gord

On Mon, 12 May 2008 01:30:41 -0400, "Earl Kiosterud" <someone@nowhere.com>
wrote:

>Could a user not open the workbook with macros disabled, then be able to save his changed
>copy?


Re: saving excel file by Gord

Gord
Mon May 12 19:46:24 CDT 2008

I don't know how the code is working fine if you did not disable events before
saving after entering the code in Thisworkbook.

How did you save the workbook so's the code is saved?

In order to save the workbook with the code you added to Thisworkbook, you have
to disable events the one time.

The disable and enable Subs would go into a General module.

Run the disable sub then save the workbook.

Run the enable Sub.


Gord

On Sun, 11 May 2008 22:30:01 -0700, Kevin <Kevin@discussions.microsoft.com>
wrote:

>Thank u Gord,
>The first code is working fine, I am little confused about disabling &
>enabling of events. Where to enable this pls help. Thanks in advance.
>Kevin.
>
>"Gord Dibben" wrote:
>
>> Stick these in Thisworkbook module.
>>
>> Private Sub Workbook_BeforeClose(Cancel As Boolean)
>> ThisWorkbook.Saved = True
>> ThisWorkbook.Close
>> End Sub
>>
>> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
>> Cancel = True
>> End Sub
>>
>> To save the workbook with this code you must disable events then save.
>>
>> Sub disable()
>> Application.EnableEvents = False
>> End Sub
>>
>> Save workbook at this point.
>>
>> Re-enable events and no further saving will take place.
>>
>> Sub enable()
>> Application.EnableEvents = True
>> End Sub
>>
>>
>> Gord Dibben MS Excel MVP
>>
>>
>> On Sat, 10 May 2008 22:54:01 -0700, Kevin <Kevin@discussions.microsoft.com>
>> wrote:
>>
>> >Hi,
>> >I have some formulas and data which is shared for the users to get their
>> >answers instantly. Is there any way not to allow users to save the excel
>> >shared file if they make any changes. Is it possible if the users close the
>> >file with some changes excel exit without prompting or saving??. i tried read
>> >only, protect sheet etc. its of no use.
>> >Thanks
>> >Kevin
>>
>>


Re: saving excel file by Kevin

Kevin
Tue May 13 01:32:00 CDT 2008

Sorry for the late reply Gord, Actually i don't remember wot i did but the
first code is working fine and the excel file exit without saving. i tried
your suggesstion to disable and enabling its also working fine. since i don't
have much knowledge about codes wot i did i just copied your code and saved
it. anyway thanks a lot. i will try to figure out in a new workbook how your
first code is saved and defnitely i will let you know about this.
thanks a lot.
kevin

"Gord Dibben" wrote:

> I don't know how the code is working fine if you did not disable events before
> saving after entering the code in Thisworkbook.
>
> How did you save the workbook so's the code is saved?
>
> In order to save the workbook with the code you added to Thisworkbook, you have
> to disable events the one time.
>
> The disable and enable Subs would go into a General module.
>
> Run the disable sub then save the workbook.
>
> Run the enable Sub.
>
>
> Gord
>
> On Sun, 11 May 2008 22:30:01 -0700, Kevin <Kevin@discussions.microsoft.com>
> wrote:
>
> >Thank u Gord,
> >The first code is working fine, I am little confused about disabling &
> >enabling of events. Where to enable this pls help. Thanks in advance.
> >Kevin.
> >
> >"Gord Dibben" wrote:
> >
> >> Stick these in Thisworkbook module.
> >>
> >> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> >> ThisWorkbook.Saved = True
> >> ThisWorkbook.Close
> >> End Sub
> >>
> >> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> >> Cancel = True
> >> End Sub
> >>
> >> To save the workbook with this code you must disable events then save.
> >>
> >> Sub disable()
> >> Application.EnableEvents = False
> >> End Sub
> >>
> >> Save workbook at this point.
> >>
> >> Re-enable events and no further saving will take place.
> >>
> >> Sub enable()
> >> Application.EnableEvents = True
> >> End Sub
> >>
> >>
> >> Gord Dibben MS Excel MVP
> >>
> >>
> >> On Sat, 10 May 2008 22:54:01 -0700, Kevin <Kevin@discussions.microsoft.com>
> >> wrote:
> >>
> >> >Hi,
> >> >I have some formulas and data which is shared for the users to get their
> >> >answers instantly. Is there any way not to allow users to save the excel
> >> >shared file if they make any changes. Is it possible if the users close the
> >> >file with some changes excel exit without prompting or saving??. i tried read
> >> >only, protect sheet etc. its of no use.
> >> >Thanks
> >> >Kevin
> >>
> >>
>
>

Re: saving excel file by Gord

Gord
Tue May 13 11:16:59 CDT 2008

Thanks for the feedback.

You must have stumbled onto something I can't figure out but results are what
you wanted.


Gord

On Mon, 12 May 2008 23:32:00 -0700, Kevin <Kevin@discussions.microsoft.com>
wrote:

>Sorry for the late reply Gord, Actually i don't remember wot i did but the
>first code is working fine and the excel file exit without saving. i tried
>your suggesstion to disable and enabling its also working fine. since i don't
>have much knowledge about codes wot i did i just copied your code and saved
>it. anyway thanks a lot. i will try to figure out in a new workbook how your
>first code is saved and defnitely i will let you know about this.
>thanks a lot.
>kevin
>
>"Gord Dibben" wrote:
>
>> I don't know how the code is working fine if you did not disable events before
>> saving after entering the code in Thisworkbook.
>>
>> How did you save the workbook so's the code is saved?
>>
>> In order to save the workbook with the code you added to Thisworkbook, you have
>> to disable events the one time.
>>
>> The disable and enable Subs would go into a General module.
>>
>> Run the disable sub then save the workbook.
>>
>> Run the enable Sub.
>>
>>
>> Gord
>>
>> On Sun, 11 May 2008 22:30:01 -0700, Kevin <Kevin@discussions.microsoft.com>
>> wrote:
>>
>> >Thank u Gord,
>> >The first code is working fine, I am little confused about disabling &
>> >enabling of events. Where to enable this pls help. Thanks in advance.
>> >Kevin.
>> >
>> >"Gord Dibben" wrote:
>> >
>> >> Stick these in Thisworkbook module.
>> >>
>> >> Private Sub Workbook_BeforeClose(Cancel As Boolean)
>> >> ThisWorkbook.Saved = True
>> >> ThisWorkbook.Close
>> >> End Sub
>> >>
>> >> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
>> >> Cancel = True
>> >> End Sub
>> >>
>> >> To save the workbook with this code you must disable events then save.
>> >>
>> >> Sub disable()
>> >> Application.EnableEvents = False
>> >> End Sub
>> >>
>> >> Save workbook at this point.
>> >>
>> >> Re-enable events and no further saving will take place.
>> >>
>> >> Sub enable()
>> >> Application.EnableEvents = True
>> >> End Sub
>> >>
>> >>
>> >> Gord Dibben MS Excel MVP
>> >>
>> >>
>> >> On Sat, 10 May 2008 22:54:01 -0700, Kevin <Kevin@discussions.microsoft.com>
>> >> wrote:
>> >>
>> >> >Hi,
>> >> >I have some formulas and data which is shared for the users to get their
>> >> >answers instantly. Is there any way not to allow users to save the excel
>> >> >shared file if they make any changes. Is it possible if the users close the
>> >> >file with some changes excel exit without prompting or saving??. i tried read
>> >> >only, protect sheet etc. its of no use.
>> >> >Thanks
>> >> >Kevin
>> >>
>> >>
>>
>>