Having a problem calling a function that copies a working module from an existing workbook project to a newly created one. I found the routine that appears to do what I want it to on
I set the references under tools for MS VBA Extensibitiy 5.3. as instructed. The function declaration is as follows:
Function CopyModule(Module1 As String, _
SMEM As VBIDE.VBProject, _
VBAProject As VBIDE.VBProject, _
OverwriteExisting As Boolean) As Boolean
I've substituted the ModuleName, FromVBAProject, and ToVBAProject name with my own as instructed.
Not quite sure what type of call function command is needed, e.g. arguments, etc. Also, is my substitution of names in the declaration correct?
Any help would appreciated. PD
Code:
http://www.cpearson.com/excel/vbe.aspx/
Function CopyModule(Module1 As String, _
SMEM As VBIDE.VBProject, _
VBAProject As VBIDE.VBProject, _
OverwriteExisting As Boolean) As Boolean
I've substituted the ModuleName, FromVBAProject, and ToVBAProject name with my own as instructed.
Not quite sure what type of call function command is needed, e.g. arguments, etc. Also, is my substitution of names in the declaration correct?
Any help would appreciated. PD