Hi,
How do i copy modules form one workbook to another through vba.
Regards,
Deepak
Hi,
How do i copy modules form one workbook to another through vba.
Regards,
Deepak
Check out Chip Pearson's site:
http://cpearson.com/excel/vbe.htm
deepakmehta wrote:
>
> Hi,
>
> How do i copy modules form one workbook to another through vba.
>
> Regards,
> Deepak
>
> --
> deepakmehta
> ------------------------------------------------------------------------
> deepakmehta's Profile: http://www.excelforum.com/member.php...o&userid=29609
> View this thread: http://www.excelforum.com/showthread...hreadid=539876
--
Dave Peterson
I have tried that but i am still unsuccessful...... help !!
What i am doing is >> making a xl. file thrugh vba code in Main.xl and then saving it as User.xl, now i need to copy one of the modules form the Main.xl to the User.xl.
Regards,
Deepak
Store your code as .bas files and use the procedures at Chip's site to import
them.
deepakmehta wrote:
>
> I have tried that but i am still unsuccessful...... help !!
>
> What i am doing is >> making a xl. file thrugh vba code in Main.xl and
> then saving it as User.xl, now i need to copy one of the modules form
> the Main.xl to the User.xl.
>
> Regards,
> Deepak
>
> --
> deepakmehta
> ------------------------------------------------------------------------
> deepakmehta's Profile: http://www.excelforum.com/member.php...o&userid=29609
> View this thread: http://www.excelforum.com/showthread...hreadid=539876
--
Dave Peterson
deepakmehta wrote
> What i am doing is >> making a xl. file thrugh vba code in Main.xl and
> then saving it as User.xl, now i need to copy one of the modules form
> the Main.xl to the User.xl.
>
Study the code on that site that looks like this:
With ThisWorkbook
FName = .Path & "\code.txt"
..VBProject.VBComponents("Module2").Export FName
End With
ActiveWorkbook.VBProject.VBComponents.Import FName
Kill FName
--
David
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks