D
davidm
Thanks to David McRitchie, I was able to deploy the following Chip
Pearson's code to import code modules (complete with their denizen of
procedures) from one workbook to my Personal workbook project. It
worked like charm!
Still in the glow of my delight, I have spent some hours trying to
figure out the logic of "killing" the Filename (FName) both prior to
exporting and importing. Could someone kindly shed some light on this.
I am baffled. (Below is the code).
Sub CopyAllModules()
Dim FName As String
Dim VBComp As VBIDE.VBComponent
With Workbooks("Storer")
FName = .Path & "\code.txt"
If Dir(FName) <> "" Then
*Kill FName*
End If
For Each VBComp In .VBProject.VBComponents
If VBComp.Type <> vbext_ct_Document Then
VBComp.Export FName
Workbooks("Personal").VBProject.VBComponents.Import FName
* Kill FName*
End If
Next VBComp
End With
End Sub
Pearson's code to import code modules (complete with their denizen of
procedures) from one workbook to my Personal workbook project. It
worked like charm!
Still in the glow of my delight, I have spent some hours trying to
figure out the logic of "killing" the Filename (FName) both prior to
exporting and importing. Could someone kindly shed some light on this.
I am baffled. (Below is the code).
Sub CopyAllModules()
Dim FName As String
Dim VBComp As VBIDE.VBComponent
With Workbooks("Storer")
FName = .Path & "\code.txt"
If Dir(FName) <> "" Then
*Kill FName*
End If
For Each VBComp In .VBProject.VBComponents
If VBComp.Type <> vbext_ct_Document Then
VBComp.Export FName
Workbooks("Personal").VBProject.VBComponents.Import FName
* Kill FName*
End If
Next VBComp
End With
End Sub