Copying VBAproject components
Hi All,
I’ve put up a new tool you can download from my site.
The utility enables you to copy the components from the VBAProject of workbook A to Workbook B. Screenshot below.
Enjoy!
Daily posts of Excel tips…and other stuff
Hi All,
I’ve put up a new tool you can download from my site.
The utility enables you to copy the components from the VBAProject of workbook A to Workbook B. Screenshot below.
Enjoy!
Certain comments are subject to moderation and may not appear immediately. You can use HTML tags in your comment. If you include a greater-than or less-than sign or anything else that could be interpreted as HTML, your comment won't look nice. You need to escape those characters. To post VBA code in your comment, use [VB] tags, like this: [VB]Code goes here[/VB].

Bill:
Your link isn’t working, correct link:
http://www.jkp-ads.com/Downloadscript.asp?filename=CopyVBAProject.zip
1 June 2007, 1:06 pmJeremy:
Thanks Jan! I usually open both files and drag and drop in the VBE. This will make things a little easier.
1 June 2007, 2:32 pmJ-Walk:
JK, the download link on your site doesn’t seem to be working.
What’s the advantage in using the tool compared to plain old drag-and-drop in the VB Project window?
1 June 2007, 3:02 pmjkpieterse:
The main advantage is that it detects object modules (TWB and sheet) and copies their content entirely.
Note that it copies by the name of the worksheet TAB, NOT by the code name.
I’ll fix the link. Thanks.
2 June 2007, 2:53 amJohn Wilson:
J-Walk…..
Practical application….I work in an office where I’ve developed a rather elaborate (IMHO) timesheet for 9 different people. Every once in a while I make some enhancements to it. To keep track of what I’ve done and rewrite it (or drag and drop) to each of the other 8 is a pain. I’ve copied/modified some of Chip’s code to delete and overwrite the VBA code from one timesheet to another but it doesn’t always work as expected.
Jan Karel….
3 June 2007, 8:45 pmGreat idea and could be very useful but doesn’t work in my application (for the same reason that I can’t get Chip’s code to work 100% of the time).
An option to delete (overwrite) a module in the target that already exists in the source would be a definite bonus.
Jon Peltier:
John -
Put all the code into an add-in. It’s easier to update an entire file than to try to update portions of code, especially with Office 2002’s introduction of security constraints revolving around permission to access the VB project via code.
3 June 2007, 9:50 pmjkpieterse:
John: Good idea.
4 June 2007, 12:57 amJan:
Has anyone else used the VBACodeCompare by formulasoft. It is free! (I am easy to please) and really quite slick. Bad news is it doesn’t seem to have been updated for 2007 yet.
I really rate it. It is very helpful for telling where your versions diverged, particularly in these copy scenarios.
Althought there is a basic flaw in that it should be able to spot identically matching module names and highlight them so that you don’t need to check each one by hand. (It is more flexible in that it can compare any two objects).
I wrote my own but it isn’t anywhere near this good.
Hope this is useful to someone.
4 June 2007, 4:08 amjkpieterse:
Hi,
Just announcing I have updated the tool to build 005, which fixes the problem that Class modules are not copied.
11 September 2007, 8:01 amTimeSheet Software:
However, i think tracktime record nicely about what had already happen (past), it would be nice if the software can suggest/ hint the future base on what one have done in the past, e. g. if i had use iphoto for long period of time on last monday, there will be a popup or some kind of reminder, suggesting that i should use iphoto again on monday, that way, one will always have things to do….
13 March 2008, 11:27 am