Calling a procedure in a protected VBA Addin Project

  • Thread starter Thread starter Tony Seiscons
  • Start date Start date
T

Tony Seiscons

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,

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top