Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule macro to run without setting macro security to low

Status
Not open for further replies.

smartbutdull

IS-IT--Management
Sep 17, 2003
8
0
0
GB
I have an excel report that uses a VBA macro to query an oracle database.

I've created a second spreadsheet with an auto_open macro that opens the main report, runs the update macro, then saves and closes the report then closes itself.

I've scheduled this second spreadsheet to run at 7:30am using scheduled tasks.

As Excel asks you if you want to enable macros when you open a spreadsheet I've had to set macro security to low, but I'm not comfortable with this.

Is there a better way of scheduling my macro to run without lowering my macro security?

I'm running Excel 2000, I don't have VB compiler, and don't have a digital certificate.

Phil
 
Hi,
If you have windows 2000, then run the following program to create your own certificate:

SelfCert.exe (usually found in the C:\Program Files\Microsoft Office\Office10 folder).

In the new book that has the macro, in VBA code, go to
Tools = Digital Signature…
And add a signature. Save and reopen this book with high security.
Then tell excel to always trust this signature.



Jean-Paul
Montreal
jp@solutionsvba.com
mtljp2@sympatico.ca
 
Thanks both of you - still struggling though.

Skip
Opening the main report is fine (I'm already using Application.DisplayAlerts = False). It's opening the workbook with the auto_open macro in the first place that gives me a problem.

Jean-Paul
Thanks for the tip, but I'm using NT4 so that's not available to me - I guess I'd have to see if our IT dept can create one for me if that turns out to be my only option.

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top