HI there,
I already have a macro written in Book1. The macro creates a new workbook Book2.
I want the macro written in Book1 to write a macro inside Book2. Is there any way that is possible?
Thanks for all your help in advance.
HI there,
I already have a macro written in Book1. The macro creates a new workbook Book2.
I want the macro written in Book1 to write a macro inside Book2. Is there any way that is possible?
Thanks for all your help in advance.
Use a template that already has the code in it.
If posting code please use code tags, see here.
Thank You for the reply.
But how do i use a template on Book2 through a macro.
I tried using the export code and import code functionality. The code gets copied to Book2 but it does not seem to work. I dont know what i might be doing wrong. Note: the code given below is written along with the main code in Book1.Module1. There is another code in Module2 which I want to be copied to Book2
Below is the code that I have used.
![]()
Please Login or Register to view this content.
I'm suggesting you don't use code to write code.
Instead of creating a new, blank workbook create a copy of Book1 or use a template which already has the code in it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks