Hello,
I wrote a code that creates new pages based on a template. I found that I need to add three Subs() to every page that is created using this code. I have never done this before and after seraching for an answer, came out empty handed.
I am looking for a way to create a page and add code using my previously written code.
This is what I've tried to come up with so far.
Thank you for your time.
I wrote a code that creates new pages based on a template. I found that I need to add three Subs() to every page that is created using this code. I have never done this before and after seraching for an answer, came out empty handed.
I am looking for a way to create a page and add code using my previously written code.
This is what I've tried to come up with so far.
Code:
Sub AddCode()
Dim sCode As String
sCode = "sub VBAMacro()" & vbCr & " msgbox ""VBA Macro called"" " & vbCr & "end sub"
'find a way to insert this code (String) into new page
End Sub
Thank you for your time.