PDA

View Full Version : [SOLVED:] how to force users to enable macros



AhmedMatboly
10-13-2022, 06:28 AM
I like that forum and i was so newbie since one month ago and this forum was my way to start

I faced the problem of how to force users to enable macros and stop them from misuse the sheets before macro run

And i want share this method its newbie method but maybe its useful for someone

U protect the sheets with password for all users then after macro run the workbook event will unprotect sheet with sheet1.unprotect then the macros will run as u want then in beforeclose event will sheet1. protect so the another user who didnt enable macro will find sheets protected and will be forced to enable macro i think its not good method as splash sheet method but it was easier to me and less buggy

Logit
10-13-2022, 12:50 PM
Good approach. Kudos !

AhmedMatboly
10-13-2022, 01:51 PM
Good approach. Kudos !

Thanks logit hopes to hear ur opinion in that method

macropod
10-13-2022, 02:33 PM
That is a fairly standard approach. A variation on the theme is to ensure all except one worksheet are hidden by default and to only unhide the others via the macro. Do be aware that these approaches can be circumvented by users copying the revealed/accessible content to another workbook without the same protections. The scope for such circumvention can be limited by including a very hidden worksheet that has formulae/data that are essential for the proper operation of the others and so will not ordinarily be seen for it to be copied.

AhmedMatboly
10-13-2022, 03:37 PM
That is a fairly standard approach. A variation on the theme is to ensure all except one worksheet are hidden by default and to only unhide the others via the macro. Do be aware that these approaches can be circumvented by users copying the revealed/accessible content to another workbook without the same protections. The scope for such circumvention can be limited by including a very hidden worksheet that has formulae/data that are essential for the proper operation of the others and so will not ordinarily be seen for it to be copied.
I think ur point of view is right but what made me post this method that its easier for newbies like me just that..