VBA automatically agree to enable macros

0 votes

I have VBA code that uses macros to open numerous distinct Excel files. I must choose "Enable Macros" every time VBA opens a file since it states that "Microsoft Office has found a potential security threat." I can't modify any Excel settings because it's a business machine without admin permissions. Is there a way to add a line that would always select "Enable Macros"?

enter image description here

Sep 30, 2022 in Others by Kithuzzz
• 38,000 points
557 views

1 answer to this question.

0 votes
Typically, there is no security alert when opening a file with macro support using code. The code you're using to open the files should be displayed.

However, if you do see a prompt you can fix that by setting Application.AutomationSecurity to the appropriate value
answered Oct 1, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer

How to clear TextField Entered Text automatically in Flutter?

Hi@akhtar, You can control the TextField in your ...READ MORE

answered Sep 10, 2020 in Others by MD
• 95,460 points
37,925 views
0 votes
1 answer

Language independent way to get "My Documents" folder in VBA Excel 2003

 Hello :)  This code may help you in your ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,690 points
830 views
0 votes
0 answers
0 votes
1 answer

Android Studio automatically connect to Windows Subsystem for Android

Check Taskmanager for adb.exe processes and note ...READ MORE

answered Jun 16, 2022 in Others by polo
• 1,480 points
1,341 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
1,257 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
3,695 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9, 2022 in Others by gaurav
• 23,260 points
966 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,690 points
1,086 views
0 votes
1 answer
0 votes
1 answer

How to automatically get a specified range of data from Excel to XML in VBA

Range method works, always identify the sheet ...READ MORE

answered Mar 18, 2023 in Others by narikkadan
• 63,600 points
859 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP