that is the way to go but.... better yet use the very hidden comand. other wise the user can still go and unhide the sheets with macro unabled
On 2/4/10, Paul Schreiner <schreiner_p...@att.net> wrote: > The problem is this: > Evil hackers have managed to write Malicious code and place it in Excel > files. > So, Microsoft has made it possible for you to DECIDE if you want macros to > run. > Primarily, the only time this really helps is if you don't EXPECT the file > to contain > macros, yet it does, so you can choose not to enable them. > > In order for this to work, Microsoft CANNOT enable an Excel file to bypass > this feature. > Otherwise, why do it? > > What I've done is this: > > Hide all sheets (and password protect them as well as the VBA code) > Show only a single sheet that instructs the user to close and re-open it > with macros enabled. > > Then, in a Workbook_Open event, hide the cover sheet and unhide the rest. > That way, if the user opens it with macros enabled, all is well. > If he does not, he gets a minor slap... > > Best I've been able to come up with... > > Paul > > > > > ________________________________ > From: PWS <p...@twelve.me.uk> > To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com> > Sent: Thu, February 4, 2010 11:14:04 AM > Subject: $$Excel-Macros$$ BeforeSave - Enabling Macros > > Interesting situtaion which I sure others have come across before. I > cannot think of a solution, I wonder if anyone else has or can? > I have the requirement to not allow a workbook to be saved if a user > has not entered information into a specified cell. > > I thought that is easy I will write a procedure which, using the > BeforeSave event checks that the criteria (the cell has the required > information) has been fulfilled and if not will cancel the save > event. I wrote a nice warning box advising the user that the workbook > could not be saved without the criteria being fulfilled and thought > that was that. > > The first user who tried this opened the workbook, did not enable > macros, and was therefore able to save the workbook without the > required information because the Before Save event did not fire > because macro had been disabled. > > I suppose I am asking is there any way to not open a work unless macro > are enabled? > > PWS > > -- > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at > http://www.excelitems.com > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > If you find any spam message in the group, please send an email to: > Ayush Jain @ jainayus...@gmail.com > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,700 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > > -- > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at > http://www.excelitems.com > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > If you find any spam message in the group, please send an email to: > Ayush Jain @ jainayus...@gmail.com > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,700 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > -- Phillip Swanepoel pswa...@gmail.com (JanPhi) 0825360597 0287134213 34° 4'58.48"S, 21°14'51.33"E This email has been forwarded using a mobile phone with a internet/wap application. Go to www.operamini.com for more info -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,700 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe