Opening macro enabled files.

karanudasi

New Member
Joined
Apr 30, 2015
Messages
4
Hi,

I want to open a number of macro enabled files, and use the data for consolidation.
The problem is whenever the file opens the Enable/Disable macro prompt pops out and user action is to be taken.

I am trying to consolidate data for around 50 files, without user intervention. How can I suppress this option using VBA code?

Thanks.

Karan.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You cannot bypass this action in excel. This is there to protect the user from someone who embedded any malignant code into the workbook. No Macro can run until a user allows it (if the file comes from a trusted source, most users will enable the macro).
 
Upvote 0
karanudasi,

Welcome to MrExcel.

You can, in all versions of Excel, via Excel Options , disable macro security but it is not to be recommended.
If you are using 2007 + then you are able to set Trusted Locations such that any file within that location (Folder) and sub-folders if you so wish, will be trusted and can run without the need for user intervention.

It is a simple process via Excel Options >> Trust Centre >> Trusted Locations >> Add New >> Browse to location etc.

HERE is link to one of many video tutorials that will clarify the process.

Hope that helps.
 
Upvote 0
Dear Tony,

Thank you for the answer, added a trusted location and moved my files there, working perfectly now. Thanks for your quick response.

Regards,
Karan
 
Upvote 0
Dear Tony,

Greetings. While working on the same macro project, I want to have a progress bar showing the progress and percentage of completion. I have made a userform with a label, which will update its width based on the import percentage completion.

However, when I call the Userform from the module code, 2 scenarios are creating problem :
1. If the userform property "Showmodal" is true, then after showing the user form, the module code does not get executed.
2. If the userform property "Showmodal" is false, the module code runs but the user form is not getting updated with the progress.

Is there any way in which, user form can be updated basis the code running the background. Thanks in advance.

Regards,
Karan
 
Upvote 0
Is there any way in which, user form can be updated basis the code running the background. Thanks in advance.

Karan,

This is somewhat removed from the original thread so to comply with forum guidelines, I would suggest that you start a new thread with a suitably descriptive title.

That way you will likely reach a wider set of potential responders.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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