A VB macro fails with the error "The requested operation requires elevation." How can I enforce administrator privilege?

I have been using this code for some while.
One of the users has had his PC replaced.
His new PC triggers the following error in Excel:

Run-time error '2157054156 (800702e-4'):
Automation error
The requested operation requires elevation.

When I click the debug button the following code is highlighted
Set OutApp = CreateObject("Outlook.Application")

Please advise
spar-kleOperations DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

"The requested operation requires elevation." - did you follow that advice and elevate?
Right click the script or the program that triggers it and select "run as administrator"
spar-kleOperations DirectorAuthor Commented:
If I right click the Excel icon and run as administrator, then open the file within the Excel window it seems to work.
But I really need to write this somehow into the VBA, or change the default settings because of the way our systems work.
If it worked before, it could be, that you simply worked as administrator with UAC off - could that be?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

spar-kleOperations DirectorAuthor Commented:
Thanks for your reply.
The user has the same access and UAC is off.
I was asking about the old system. UAC was off there, right?
Now, on the new system, it is off, too? and you rebooted after turning it off?

I am not recommending to solve it by turning off UAC, no. find out what your macro is doing that requires elevation. Does it write to protected folders or registry keys? List those, please.
spar-kleOperations DirectorAuthor Commented:
Yes, the UAC was off on the old and the new system. (rebooted too)
The user has local administrator privileges.

It doesn't write to protected folders or keys.

I believe that the elevation is required because the coding writes to an Outlook email.
If Excel isn't opened as Administrator it causes the issue.
Ok, I am not experienced with macro code. You can share it here and I hope that someone else will be able to help you.
Zeth LarssonCommented:
Try this.
Open MS Excel
Open the VBA Editor
In the top menu select "Tools - > References"
In the list of "Avaible references" go down an check those who begin with "Microsoft Outlook..."
You can begin with "Microsoft Outlook 14.0 Object Library" if it's unchecked. Back out with OK, to be sure it's loaded, restart MS Excel, then try run your application.
spar-kleOperations DirectorAuthor Commented:
Thanks for your help Zeth.
Microsoft Outlook was in the list and checked within Excel.

I found that the issue related to a DELL security layer that's shipped with the new PC's.
After stripping this off everything works fine.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
spar-kleOperations DirectorAuthor Commented:
Everything works fine after removing DELL security
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.