Stop running macros from other workbook.

uloveonce

New Member
Joined
May 31, 2006
Messages
38
My request is unusual because I have searched internet for the answer, but could not find any thing on this.

I have some macros in my current workbook, but I do not want any macros from other workbook to be run on this workbook. I want to lock the workbook from running any outside macros. Only Macro's in this current workbook should be allowed.

Please help me on this.

Thank you
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
One month and still no reply.

I thought this would be a very good macro for security purpose..

Thanks..
 
Upvote 0
you will need to use the event Application.WorkbookOpen to detect when any other workbook is opened and prevent it from opening until you close this workbook. Also, when you open this workbook you will want to test for other already open workbook and refuse to open.
 
Upvote 0
Hi there,

Actually I've the same problem as uloveonce. I was trying to block all the external macros from running on my worksheet, even the macros that are not part of workbooks/worksheets. Let me explain, I've a file with a macro doing some stuff, including hiding the formula bar whenever you "activate" this workbook window and unhidding it again when you go to another worksheet.

The thing is that there are macros that you run directly from Excel, not even open an workbook/worksheet. You just run a Microsoft Excel Add-in file and it appears as a TAB next to developer (in my case), but if you go to VBA, then you can see that it has a macro related to it. I want to stop this type of macros from accessing my workbook/worksheet.

How can I do that? Is there anyway?

I can't believe that microsoft hasn't thought about that as there are plenty of files like this to take the information from excel workbooks, so all the security of Excel files is corrupted if you can just run an add-in and take the information.
 
Upvote 0

Forum statistics

Threads
1,216,086
Messages
6,128,734
Members
449,466
Latest member
Peter Juhnke

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