referencing code in a password protected xla

oliver_penney

Board Regular
Joined
Dec 18, 2002
Messages
182
hi

i've got an xla with a password on it, fair enough they can protect their own code

i can use the toolbar that came with it to run the code, but how can i run it in VBA?

i can see the action i want to run in the object browser, but how do i reference it??

and (mais oui) if i record a macro it doesn't pick up on it
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You can use the Execute method of the CommandBarControl (see VBA Help for an example) or the Run method, eg:

Application.Run "'TheAddin.xla'!TheMacro"
 

oliver_penney

Board Regular
Joined
Dec 18, 2002
Messages
182
wahey!

:pray:

fantastic, thanx

it didn't even occur to me that the toolbars would be a collection, *doh*

thanx again
 

Watch MrExcel Video

Forum statistics

Threads
1,118,530
Messages
5,572,686
Members
412,481
Latest member
nhantam
Top