PC Review


Reply
Thread Tools Rate Thread

Calling a function from a Sub

 
 
DaveO
Guest
Posts: n/a
 
      16th Jun 2008
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!
 
Reply With Quote
 
 
 
 
DaveO
Guest
Posts: n/a
 
      16th Jun 2008
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!
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method of calling a function where function name is stored in a variable or control Tony Vrolyk Microsoft Access VBA Modules 9 12th Jul 2007 07:20 PM
Method of calling a function where function name is stored in a variable or control Bob Quintal Microsoft Access 2 11th Jul 2007 08:49 PM
Calling EXE Function Getting handle to calling exe Abhishek Microsoft VC .NET 1 25th Sep 2006 01:58 PM
Calling managed function from unmanaged function in mixed mode dll slugster@gmail.com Microsoft VC .NET 1 25th Jul 2005 07:30 AM
Calling DoCmd.RunCommand acCmdSaveRecord, after calling an API function Savvoulidis Iordanis Microsoft Access Form Coding 2 19th Mar 2005 06:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:17 PM.