Originally Posted by
Trefor
I found the following code (sorry can't remember where now), it work great
with one catch, if ThisWorkbook is password protected the routine fails.
Dim myFile As String
myFile = "CCRFMacro.bas"
ThisWorkbook.VBProject.VBComponents("CCRFMacro").Export (myFile)
ActiveWorkbook.VBProject.VBComponents.Import (myFile)
Kill myFile
The error is "Can't perform operation since the project is projected."
I do not want to unprotect the project, so is there another option to copy a
mudule from ThisWorkbook to ActiveWorkbook?
--
Trefor
Bookmarks