Excel crashes on copying macro using VBE.VBproject

G

Guest

Hello,

(Env excel 2003)

I have developed the code that replicates the code (macors) from Workbook1
to Workbook2. Including code in modules, sheets and thisworkook object.

When I run this code from within workbook1, it copies all the macro fine
from Workbook2 to Workbook1.

But when I move this code in an addin and try to replicate code from one
Workbook to another excel crashes.

The code triggers in 'workbook open' event of workbook1. From here a
procedure in an addin is called that tries to replicate the code from WB1 to
WB2.

I have changed all the early bining to late binding all over my code
whereever possible and fully qualified all the objects used in my code
wherever possible.

If anyone has experienced this or have any suggestion.

Please let me know if more information is required.

Thanks,

Nayan
 
G

Guest

Nayan,

I guess your problem is in your addin... try to check wether addin is
protected in vbproject.

or try to check the line of codemodule you wish to copy...

and please post your error message while running code to copy entire module
contents, so other people can see your problem.
 

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

Top