L
Ladislav Ligart
Excel 2000. I have wkbUtils.xla with an auto-signed certificate, Excel
Security on High.
wkbUtils.xla opens at Excel startup and Workbook_Open runs, creating
an on-the-fly command bar with an msoControlPopup control. I loop
through one of the modules' CodeModule Property to find the names of
all the subs there and place in an array, vProcs(). Back on the
msoControlPopup I then add an msoControlButton for each each of the
subs in vProcs(), with the following OnAction:
.OnAction = "'wkbUtils.Runner " & """" & vProcs(i) & """" & "'"
As you can see, instead of calling each sub directly, I call
wkbUtils.Runner, passing the sub name to it. Runner then brings up a
userform with various controls allowing the user to set options and
then click "Run" to start the macro. It also contains a progress bar.
The problem is, when I have Security set to high, and click one of the
msoControlButtons, it won't run wkbUtils.Runner. It's as if because
I'm adding another level of "calling" to the mix, it doesn't recognize
that Runner is in a trusted, certified workbook (in fact, the same
workbook that it already ran code from).
Security on High.
wkbUtils.xla opens at Excel startup and Workbook_Open runs, creating
an on-the-fly command bar with an msoControlPopup control. I loop
through one of the modules' CodeModule Property to find the names of
all the subs there and place in an array, vProcs(). Back on the
msoControlPopup I then add an msoControlButton for each each of the
subs in vProcs(), with the following OnAction:
.OnAction = "'wkbUtils.Runner " & """" & vProcs(i) & """" & "'"
As you can see, instead of calling each sub directly, I call
wkbUtils.Runner, passing the sub name to it. Runner then brings up a
userform with various controls allowing the user to set options and
then click "Run" to start the macro. It also contains a progress bar.
The problem is, when I have Security set to high, and click one of the
msoControlButtons, it won't run wkbUtils.Runner. It's as if because
I'm adding another level of "calling" to the mix, it doesn't recognize
that Runner is in a trusted, certified workbook (in fact, the same
workbook that it already ran code from).