PC Review


Reply
Thread Tools Rate Thread

Close Workbook If user disables macro's

 
 
=?Utf-8?B?bW1jMzA4?=
Guest
Posts: n/a
 
      23rd Oct 2006
I am currently looking for a way to close a workbook if the user has a lower
security setting than meduim or the user chooses to disable macro's

The reason for this I have a macro in the work book that checks for a data
and lock the worksheet if the date has passed, however if they disable the
macro's they can work on this worksheet

Any idea would be appreciated
TIA
Michael
 
Reply With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      23rd Oct 2006
If the user disables macros, then there is nothing you can do. There is no
setting that does what you ask. In fact, a medium setting prompts the user
to disable macros.

Sounds like you have some type of free trial setup. You are just kidding
yourself if you think you can enforce this from within excel.

--
Regards,
Tom Ogilvy


"mmc308" <(E-Mail Removed)> wrote in message
news:9D5B601C-0F9E-439C-B168-(E-Mail Removed)...
>I am currently looking for a way to close a workbook if the user has a
>lower
> security setting than meduim or the user chooses to disable macro's
>
> The reason for this I have a macro in the work book that checks for a data
> and lock the worksheet if the date has passed, however if they disable the
> macro's they can work on this worksheet
>
> Any idea would be appreciated
> TIA
> Michael



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      23rd Oct 2006
As Tom says, you cannot do what you want, but you can make it obvious to
the user that they shouldn't.

One way to approach this is as follows.
- create a worksheet with a message on explaining that for this workbook to
run it needs macros enabled, maybe even a few screenshots
- hide all other worksheets]
- add some code in the Workbook_Open event that un hides the other sheets,
but hides that sheet.


What happens is that if they do not enable macros, they will only see the
warning sheet, telling them how to do it. If the enable macros, it will
startup as the workbook it should be.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"mmc308" <(E-Mail Removed)> wrote in message
news:9D5B601C-0F9E-439C-B168-(E-Mail Removed)...
> I am currently looking for a way to close a workbook if the user has a

lower
> security setting than meduim or the user chooses to disable macro's
>
> The reason for this I have a macro in the work book that checks for a data
> and lock the worksheet if the date has passed, however if they disable the
> macro's they can work on this worksheet
>
> Any idea would be appreciated
> TIA
> Michael



 
Reply With Quote
 
=?Utf-8?B?bW1jMzA4?=
Guest
Posts: n/a
 
      23rd Oct 2006
Bob

Thanks for your idea, I am almost there, I have created a single worksheet
that if the workbook is opened, the worksheets that they can enter data on
are hidden unless the Marco's are enabled - they also re-hidden on closure.

The only thing I need to disable is the Unhide worksheet from the Format menu?

Can this be done on closure

TIA

Michael



"Bob Phillips" wrote:

> As Tom says, you cannot do what you want, but you can make it obvious to
> the user that they shouldn't.
>
> One way to approach this is as follows.
> - create a worksheet with a message on explaining that for this workbook to
> run it needs macros enabled, maybe even a few screenshots
> - hide all other worksheets]
> - add some code in the Workbook_Open event that un hides the other sheets,
> but hides that sheet.
>
>
> What happens is that if they do not enable macros, they will only see the
> warning sheet, telling them how to do it. If the enable macros, it will
> startup as the workbook it should be.
>
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "mmc308" <(E-Mail Removed)> wrote in message
> news:9D5B601C-0F9E-439C-B168-(E-Mail Removed)...
> > I am currently looking for a way to close a workbook if the user has a

> lower
> > security setting than meduim or the user chooses to disable macro's
> >
> > The reason for this I have a macro in the work book that checks for a data
> > and lock the worksheet if the date has passed, however if they disable the
> > macro's they can work on this worksheet
> >
> > Any idea would be appreciated
> > TIA
> > Michael

>
>
>

 
Reply With Quote
 
=?Utf-8?B?bW1jMzA4?=
Guest
Posts: n/a
 
      23rd Oct 2006
Tom

Not sure where you are coming from with the "Free Trial", just trying to
stop users entering data on to sheets where the date has passt, thanks for
letting me know that I cannot disable the macro service, Bob Phillips has
given me a good train of thought

Thanks Michael

"Tom Ogilvy" wrote:

> If the user disables macros, then there is nothing you can do. There is no
> setting that does what you ask. In fact, a medium setting prompts the user
> to disable macros.
>
> Sounds like you have some type of free trial setup. You are just kidding
> yourself if you think you can enforce this from within excel.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "mmc308" <(E-Mail Removed)> wrote in message
> news:9D5B601C-0F9E-439C-B168-(E-Mail Removed)...
> >I am currently looking for a way to close a workbook if the user has a
> >lower
> > security setting than meduim or the user chooses to disable macro's
> >
> > The reason for this I have a macro in the work book that checks for a data
> > and lock the worksheet if the date has passed, however if they disable the
> > macro's they can work on this worksheet
> >
> > Any idea would be appreciated
> > TIA
> > Michael

>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      24th Oct 2006
Make them very hidden, they can't unhide these from the menu option.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"mmc308" <(E-Mail Removed)> wrote in message
news:14F603FB-92F3-4C06-B52F-(E-Mail Removed)...
> Bob
>
> Thanks for your idea, I am almost there, I have created a single worksheet
> that if the workbook is opened, the worksheets that they can enter data on
> are hidden unless the Marco's are enabled - they also re-hidden on

closure.
>
> The only thing I need to disable is the Unhide worksheet from the Format

menu?
>
> Can this be done on closure
>
> TIA
>
> Michael
>
>
>
> "Bob Phillips" wrote:
>
> > As Tom says, you cannot do what you want, but you can make it obvious

to
> > the user that they shouldn't.
> >
> > One way to approach this is as follows.
> > - create a worksheet with a message on explaining that for this workbook

to
> > run it needs macros enabled, maybe even a few screenshots
> > - hide all other worksheets]
> > - add some code in the Workbook_Open event that un hides the other

sheets,
> > but hides that sheet.
> >
> >
> > What happens is that if they do not enable macros, they will only see

the
> > warning sheet, telling them how to do it. If the enable macros, it will
> > startup as the workbook it should be.
> >
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > (replace somewhere in email address with gmail if mailing direct)
> >
> > "mmc308" <(E-Mail Removed)> wrote in message
> > news:9D5B601C-0F9E-439C-B168-(E-Mail Removed)...
> > > I am currently looking for a way to close a workbook if the user has a

> > lower
> > > security setting than meduim or the user chooses to disable macro's
> > >
> > > The reason for this I have a macro in the work book that checks for a

data
> > > and lock the worksheet if the date has passed, however if they disable

the
> > > macro's they can work on this worksheet
> > >
> > > Any idea would be appreciated
> > > TIA
> > > Michael

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?bW1jMzA4?=
Guest
Posts: n/a
 
      24th Oct 2006
Bob

Thanks very much job done,

Michael

"Bob Phillips" wrote:

> Make them very hidden, they can't unhide these from the menu option.
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "mmc308" <(E-Mail Removed)> wrote in message
> news:14F603FB-92F3-4C06-B52F-(E-Mail Removed)...
> > Bob
> >
> > Thanks for your idea, I am almost there, I have created a single worksheet
> > that if the workbook is opened, the worksheets that they can enter data on
> > are hidden unless the Marco's are enabled - they also re-hidden on

> closure.
> >
> > The only thing I need to disable is the Unhide worksheet from the Format

> menu?
> >
> > Can this be done on closure
> >
> > TIA
> >
> > Michael
> >
> >
> >
> > "Bob Phillips" wrote:
> >
> > > As Tom says, you cannot do what you want, but you can make it obvious

> to
> > > the user that they shouldn't.
> > >
> > > One way to approach this is as follows.
> > > - create a worksheet with a message on explaining that for this workbook

> to
> > > run it needs macros enabled, maybe even a few screenshots
> > > - hide all other worksheets]
> > > - add some code in the Workbook_Open event that un hides the other

> sheets,
> > > but hides that sheet.
> > >
> > >
> > > What happens is that if they do not enable macros, they will only see

> the
> > > warning sheet, telling them how to do it. If the enable macros, it will
> > > startup as the workbook it should be.
> > >
> > >
> > > --
> > > HTH
> > >
> > > Bob Phillips
> > >
> > > (replace somewhere in email address with gmail if mailing direct)
> > >
> > > "mmc308" <(E-Mail Removed)> wrote in message
> > > news:9D5B601C-0F9E-439C-B168-(E-Mail Removed)...
> > > > I am currently looking for a way to close a workbook if the user has a
> > > lower
> > > > security setting than meduim or the user chooses to disable macro's
> > > >
> > > > The reason for this I have a macro in the work book that checks for a

> data
> > > > and lock the worksheet if the date has passed, however if they disable

> the
> > > > macro's they can work on this worksheet
> > > >
> > > > Any idea would be appreciated
> > > > TIA
> > > > Michael
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing a workbook from a macro doesn't close the workbook =?Utf-8?B?RGF2ZSBQ?= Microsoft Excel Programming 2 10th Jul 2007 06:16 PM
workbook close macro =?Utf-8?B?QW50aG9ueQ==?= Microsoft Excel Programming 3 22nd Dec 2005 01:03 AM
How to close a workbook which contains the macro that's just been run? dead_girl Microsoft Excel Programming 0 22nd Oct 2004 08:46 AM
How to close a workbook which contains the macro that's just been run? dead_girl Microsoft Excel Programming 1 22nd Oct 2004 07:43 AM
Protecting workbook disables macro =?Utf-8?B?QnJpYW4=?= Microsoft Excel Worksheet Functions 0 16th Sep 2004 04:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 PM.