By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 917 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

AutoExec MACRO

PhilOfWalton
Expert 100+
P: 1,430
I use very few Macros, so I have little experience of them

Below is an AutoExec Macro



This works perfectly well providing the is a second Macro called "AutoExecOriginal"

I can't use VBA Code as I am renaming a Client's Original AutoExec (IF IT EXITS) to AutoExecOriginal. Then I want to run My AutoExec first, then the Client's Original AutoExec.

What I want to do is if the AutoExecOriginal Macro can't be found, just exit the AutoExec macro. No error messages, no saving of the error in the Macro Object.

Can this be done?

Phil
Jan 30 '18 #1

✓ answered by NeoPa

In the [Condition] column of the macro call a VBA function procedure that returns True if the macro exists and False otherwise.

This will ensure the line is only ever executed if it actually exists.

Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,409
In the [Condition] column of the macro call a VBA function procedure that returns True if the macro exists and False otherwise.

This will ensure the line is only ever executed if it actually exists.
Jan 31 '18 #2

PhilOfWalton
Expert 100+
P: 1,430
So simple... I leave you to decide whether that refers to the solution or me.

Thanks

Phil
Jan 31 '18 #3

NeoPa
Expert Mod 15k+
P: 31,409
Like most experience Phil, it ain't simple till you have it.

I've been fortunate enough to have had to work on databases that included a lot of macro work originally.
Feb 1 '18 #4

Post your reply

Sign in to post your reply or Sign up for a free account.