PDA

View Full Version : open multiple workbooks and enable macros, then close



john3j
04-12-2010, 07:25 AM
Hello,

I was wondering if there was a way to enable macros in a workbook(dashboard), and then run a module that opens a number of files (i would need to type in all of the names) and then closes all windows except the dashboard without saving any changes. I have code in multiple workbooks that saves copies after it runs its code. I am trying to do all of this at once. Any help would be appreciated.

Thanks,
John: pray2:

lucas
04-12-2010, 07:46 AM
When you say enable macro's do you mean with code?

We certainly can't be helping you do that as that would allow malicious code to be run against someones wishes.

john3j
04-12-2010, 08:15 AM
haha trust me they want it. The point is to only have to hit enable once. its like a batch job. There are about 50 reports that need to be done

lucas
04-12-2010, 08:23 AM
Still, no.

They will have to do it manually.

lucas
04-12-2010, 08:45 AM
by the way, you don't have to do this on each workbook.

Each machine only. If all the reports are on one computer you can just get them to enable macros and then run your code.

mdmackillop
04-12-2010, 09:24 AM
You can digitally sign your macros and make them "trusted". See here (http://vbaexpress.com/forum/showthread.php?t=9545)
(I need to restore the images)

GTO
04-12-2010, 12:19 PM
by the way, you don't have to do this on each workbook.

Each machine only. If all the reports are on one computer you can just get them to enable macros and then run your code.

Hi Steve - just to clarify, I would take that to mean each PC. The 'trust level' stays w/the user's settings, so one must talk each user into allowing macros.