Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Hernandez, Roberto
 
Posts: n/a
Default How can force enable macros to be able to open my workbook?

"kcdonaldson" escribió en el mensaje
...
I would like to be able to force employees to enable macros for a certain
workbook or it will not let them open the workbook. And maybe put a
password
on it so if i would like to modify the workbook without the macros
enabled.



Regards!

You can´t do it directly with Excel.
You need to configure book to hide useful sheets when closing, an unhidding
it when a correct password is typed when promt...

For example, when you close your book (in the beforeclose event) you can
hide your sheets with a set of lines like this one:

Worksheets("Usefulsheet").Visible = xlSheetVeryHidden
Worksheets("NonUsefulSheet").Visible = xlSheetVisible

and in the Workbook_Open event something like:

Worksheets("Usefulsheet").Visible = xlSheetVisible
Worksheets("NonUsefulSheet").Visible = xlSheetVeryHidden

So, if user disables macros at startup, will only see a nonuseful sheet,
whit a sentence like: "you disabled macros when opening this book, close it
and able macros when promt..."

It's an easy but not 100% secure method...


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
selecting multiple sheet tabs and open another workbook Bannor Excel Discussion (Misc queries) 5 November 25th 05 02:38 AM
How do I save a workbook as a new workbook by using macros? KingKarl Excel Discussion (Misc queries) 4 November 10th 05 08:34 AM
Enable macros? Steve Excel Worksheet Functions 2 October 14th 05 04:17 PM
can't open excel workbook gerry405 New Users to Excel 1 October 8th 05 12:26 PM
Force content in closed workbook Nigel Excel Discussion (Misc queries) 1 May 16th 05 06:01 PM


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

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

About Us

"It's about Microsoft Excel"