Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Close Workbook If user disables macro's

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Close Workbook If user disables macro's

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Close Workbook If user disables macro's

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" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Close Workbook If user disables macro's

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" wrote in message
...
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Close Workbook If user disables macro's

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" wrote in message
...
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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Close Workbook If user disables macro's

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" wrote in message
...
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" wrote in message
...
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






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Close Workbook If user disables macro's

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" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to run auto_open before user disables macros at startup pinkfloydfan Excel Programming 2 October 20th 06 11:20 AM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
Test for file path, alert user and close workbook [email protected] Excel Programming 1 September 21st 05 05:08 PM
Detect macro's parent workbook or worksheet Conceptor[_2_] Excel Programming 1 April 26th 04 10:21 PM
don't let the user disable macro's in Excel Filip De Backer Excel Programming 1 April 9th 04 12:39 PM


All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"