Calling a function from a Sub

D

DaveO

I have written code to open a series of files and change the various
aspects of the tabs in those files. I've started writing code in a
file called "Revisor" which opens the target files and makes changes.

Now I need to modify the code in the target files. I found Chip
Pearson's site and found a Sub to copy Sheet modules and the
ThisWorkbook module from one file to another, and successfully
modified it to fit my application: the modifiying code is in the
Revisor file, which opens a Master file to copy "from" and the Target
files to copy "to".

My hurdle at this moment is copying Module1. Mr. Pearson's site offers
a function to perform this, but I cannot get this to work for me after
several hours of working on it. I am not familiar enough with
functions to incorporate this into the code I've written, and I can't
quite follow the "Copy A Module From One Project To Another" logic at
CPearson.com- for instance, I don't see any assignment that
distinguishes one file as FromVBProject and another as ToVBProject.

Anyone used this, or have a moment to point me in the right direction?

Thanks

And as a final note, I am stupefied and amazed by the volume of
information at CPearson.com- my hat is off to you, sir!
 
D

DaveO

Pounded my head against it some more and figured this one out:
converted the function to a Sub and specified the Source and Target
file names. Thanks!
 

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