LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Any luck using CopyModule?

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not having luck with any examples of averaging... JoeQwerty Excel Worksheet Functions 2 February 22nd 12 05:08 PM
Help - I've tried all kinds of things but no luck. slfwalsh Excel Worksheet Functions 1 May 21st 10 07:09 PM
Pushing my luck gb_S49 Excel Worksheet Functions 6 April 11th 05 06:01 PM
Jerry Lewis LUCK ? OZDOC1050 Excel Worksheet Functions 1 December 29th 04 01:13 PM
LUCK ? OZDOC1050 Excel Worksheet Functions 3 December 29th 04 01:13 PM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"