LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Help with CopyModule coding

Hello all!

I need to update the VBA code in a tool used by numerous people across the US and found Chip Pearson's code that would seem to solve my problem; the code is he
http://www.cpearson.com/excel/vbe.aspx

However, when I try to use it I get the following Compile Error:
Function call on left-hand side of assignment must return Variant or Object

My code looks like this:

Sub patch()

Dim VBAEditor As VBIDE.VBE
Dim ThisVBProj As VBIDE.VBProject
Dim ThatVBProj As VBIDE.VBProject

Set VBAEditor = Application.VBE
Set ThisVBProj = VBAEditor.ActiveVBProject
Set ThatVBProj = Application.Workbook("Patch Test.xlsm").VBProject

CopyModule("CODE_Clear_Tertial_Data", ThisVBProj, ThatVBProj, False) = True

End Sub

Any/all help is greatly appreciated!

Thanks,
Ray
 
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
Any luck using CopyModule? Janie Excel Programming 11 October 9th 08 02:56 PM
How to fix the coding? Eric Excel Worksheet Functions 0 February 26th 08 03:38 AM
How to fix the coding? Eric Excel Worksheet Functions 4 June 20th 07 02:42 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
Implant macro coding into ASP coding Sam yong Excel Programming 5 September 15th 05 10:37 AM


All times are GMT +1. The time now is 06:29 AM.

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

About Us

"It's about Microsoft Excel"