Excel REQUIRE MACROS Solution: "Smokescreen" Technique

infrequentcoder

New Member
Joined
Sep 12, 2022
Messages
14
Office Version
  1. 2021
  2. 2019
  3. 2016
Platform
  1. Windows
Finally, there is an updated and legitimate way to require macros, which I will share with you here and stumbled upon via trial of various methods. The common methods found online, such as toggling worksheets visibility, are flawed at best.

INTRODUCING, the very simple yet effective "smokescreen" technique.

This process involves two major actions:
- Secondary workbook
- VBA code obfuscation/invisibility

1. The first step is to encrypt the workbook for which you want to require macros with an "open" password between 1 and 255 characters.

2. Next, you will create a totally SEPARATE workbook. This workbook effectively serves as your "smokescreen".

3. You will add an icon/shape/image within this workbook on any sheet that is assigned to an internal macro. The purpose of this macro is to launch the primary workbook. This assigned macro can not be triggered without Trust Center macros enabled.

4. Create the macro which opens the primary workbook and inputs the special password. You may have to error check for handling whether the Trust Center also has access the VBA project object model as a condition prior to launching primary workbook. This will depend on your subsequent code requirements.

5. Assign authenticating macro to object on worksheet

6. Obfuscate/prevent visibility of the secondary workbook VBA code to conceal the necessary password for opening the primary workbook. This step is being prematurely revealed. There are a few solutions available online, which are still being tested by myself. They involve going into the .bin file of the VBA project itself. I will hopefully post a final solution for the community once all is debugged.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
That's going to be difficult unless you have a commercial payment for macro signing first
 
Upvote 0
That's going to be difficult unless you have a commercial payment for macro signing first
How do you mean? This method works flawlessly at the moment except for the portion which provides inaccessibility to the VBA code. That is the only portion of this method still in development
 
Upvote 0
How do you mean? This method works flawlessly at the moment except for the portion which provides inaccessibility to the VBA code. That is the only portion of this method still in development
To do what you are wanting to do requires a trust certificate accessible from any computer. This is a commercial subscrition service. visit Find digital ID or digital signature services - Microsoft Support for more information. It is all about using the Excel trust centre
 
Upvote 0

Forum statistics

Threads
1,216,503
Messages
6,131,020
Members
449,615
Latest member
Nic0la

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top