0

My program is loading/opening Microsoft Excel file file contains macros and that is why the following dialog appears:

Microsoft Excel Security Notice Microsoft has blocked macros from running because the source of this file is untrusted. File Path: Book1 Microsoft has blocked macros from running because the source of this file is untrusted. More information

I am using Office 2016 on Windows 10, but such dialog has been for a long time.

The very strange thing is that up to now, e.g. during Summer of 2022, this dialog has the button 'Enable Macros'. Now the dialog is the same, but the only button has the text 'Disable Macros'.

Such dialog-button combination is beyond comprehension. From the one side the dialog says that MS has blocked macros. From the other side there is no more button 'Enable Macros', but there is 'Disable Macros' which can do nothing, because Microsoft has already blocked (disabled?) macros?

Maybe 'disabled' and 'blocked' are different things?

The main question is - how can I enable macros, if the security dialog does not provide the button to enable macros?

While researching the situation I found https://learn.microsoft.com/lv-lv/DeployOffice/security/internet-macros-blocked about possible changed of macro security handling. Microsoft is introducing these changes 2022/2023, maybe this can explain while 'Enable macros' was available during Summer 2022, but 'Disable macros' is available now (Spring 2023).

Additional information:

I am using xls (not xlsx file), this file has no 'Mark from Web' in 'File-Properties-General', my computer is running in Windows domain (I don't have more information). The strange thing is that I don't see any macro content in 'Developer-Macros' in my xls file. So, there is no anything to protect from. I am now guessing that my xls file contains some Excel 4 macros and that I should enable special regime to see them in Office 2016 (or newer) Excels. Currently, the situation is very confusing.

Additional information 2:

My file has nothing under 'Developer - Macros', but it has lot of VBA objects under 'Developer - Visual Basic' - lot of empty 'Microsoft Excel Objects' for each of the sheets and one large module in the 'Modules'. This module contains lot of functions. I am guessing that these VBA objects are something different from Macros. These VBA functions can be called from the calling applications that is doing some manipulation on this Excel file. So - no Macros, but VBA objects, that may explain strange behavior possibly?

Additional information 3:

This article https://www.ablebits.com/office-addins-blog/advantages-custom-functions-excel/ is very good explanation of differences among VBA functions and macros - the first ones are function, the second ones - sub. The first ones can act inside cell only, the the second ones - can modify blocks of cells. It appears - I have checked - that my file contains VBA functions only, no VBA macros. So, this is even more stranger - why Microsoft is reporting that it is blocking macros, if there are no macros at all?

5
  • What’s the problem with following “Steps to take to allow VBA macros to run in files that you trust” from the linked Microsoft article? Please explain how it does not apply to your situation.
    – Daniel B
    Mar 14, 2023 at 10:45
  • There are 3 problems with "Steps...": 1) my file-properties-general has no 'mark of the web' checkbox; 2) as I already said: the dialog has text that it has blocked macros, yet it has button 'Disable macro' to do the same thing again! 3) my file is xls file (not xlsx), and when I am going to 'Developer-Macros' I don't see any macros in my file at all. So, I am in very confusing situation and the point 2) dialog-button mismatch is the most confusing one.
    – TomR
    Mar 14, 2023 at 10:50
  • 1
    You should update your question to contain this crucial information (especially point 1). Also, just to make sure: You aren’t opening the file from a network drive (like your NAS) or the like? Also, is this computer managed as part of a domain or using Intune or similar?
    – Daniel B
    Mar 14, 2023 at 10:58
  • 1
    I'd say the writer of the article is writing out of his proverbial. Why would Microsoft head their article Differences between Office Scripts and VBA macros if VBA & Macros were different things. A function returns a value and can often be used as a UDF - i.e. a custom worksheet function, whereas a procedure (sub) doesn't return a value. Mar 27, 2023 at 10:56
  • 1
    Looks like you can unblock the file using Powershell. This link may provide some info to. Mar 27, 2023 at 10:58

0

You must log in to answer this question.

Browse other questions tagged .