ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling a procedure in a protected VBA Addin Project (https://www.excelbanter.com/excel-programming/311380-re-calling-procedure-protected-vba-addin-project.html)

Chip Pearson

Calling a procedure in a protected VBA Addin Project
 
Tony,

I have no problems calling macros in protected projects. What
specific error do you receive?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Tony Seiscons" wrote in message
...
Is there any way to call a procedure in a protected project? I
need to use
a call like:
Application.Run WkbName & "!" & ProcName
but when the called project is locked for viewing an error is
generated.
Tony





Tony Seiscons

Calling a procedure in a protected VBA Addin Project
 
No problem now, Chip. You get this problem if you're code tries to modify
code lines within the protected Project (i.e. modify itself) and I was able
to identify my offending code using a liberal smattering of debug.print
lines. The problem was that I was setting the Project help file with
Application.ThisWorkbook.VBProject.HelpFile = ThisWorkbook.path & "\" &
gsHELPFOLDER & "\" & gsCONTEXTHELPFILE
This constitutes modifying the Project Properties which you can't do if the
Project is protected. I believe the solution will be to use the Help API
calls.
I've got a lot of help and inspiration from you're Web site by the way so
I'd like to take the opportunity to thank you. I didn't use it but your
Alert display would have been useful for tracking this problem.
:thanx:
Tony
"Chip Pearson" wrote in message
...
Tony,

I have no problems calling macros in protected projects. What
specific error do you receive?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Tony Seiscons" wrote in message
...
Is there any way to call a procedure in a protected project? I
need to use
a call like:
Application.Run WkbName & "!" & ProcName
but when the called project is locked for viewing an error is
generated.
Tony








All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com