J
Janie
I'm using Chip Pearson's CopyModule function found at
http://cpearson.com/excel/vbe.htm. I must say, I am thrilled to find this
bit. However, I am having a problem.
I have installed the VBA Extensibility library. Then I copied the sample
code for CopyModule and pasted it into my Excel module. But when I try to
use the function, I get the error "ByRef argument type mismatch". Any hints?
here is the command line of the function:
CopyModule(ModuleName As String, _
FromVBProject As VBIDE.VBProject, _
ToVBProject As VBIDE.VBProject, _
OverwriteExisting As Boolean) As Boolean
Here's what I used in my Immediate Window
?CopyModule("basMyRoutine", ProjectA, ProjectB, True)
If I place the ProjectA and ProjectB inside quotes, I get a Type Mismatch
error, so I don't think that is the cause of my problem.
I welcome any recommendations. And thanks in advance.
http://cpearson.com/excel/vbe.htm. I must say, I am thrilled to find this
bit. However, I am having a problem.
I have installed the VBA Extensibility library. Then I copied the sample
code for CopyModule and pasted it into my Excel module. But when I try to
use the function, I get the error "ByRef argument type mismatch". Any hints?
here is the command line of the function:
CopyModule(ModuleName As String, _
FromVBProject As VBIDE.VBProject, _
ToVBProject As VBIDE.VBProject, _
OverwriteExisting As Boolean) As Boolean
Here's what I used in my Immediate Window
?CopyModule("basMyRoutine", ProjectA, ProjectB, True)
If I place the ProjectA and ProjectB inside quotes, I get a Type Mismatch
error, so I don't think that is the cause of my problem.
I welcome any recommendations. And thanks in advance.