Se non desideri aggiungere un modulo completo, puoi aggiungere solo le procedure mancanti a un modulo esistente utilizzando la macro di seguito. Aggiunge il contenuto di un file di testo a un modulo esistente:

Sub ImportModuleCode(ByVal wb As Workbook, _

ByVal ModuleName As String, ByVal ImportFromFile As String)

' imports code to ModuleName in wb from a textfile named ImportFromFile

Dim VBCM As CodeModule

If Dir(ImportFromFile) = "" Then Exit Sub

On Error Resume Next

Set VBCM = wb.VBProject.VBComponents(ModuleName).CodeModule

If Not VBCM Is Nothing Then

VBCM.AddFromFile ImportFromFile

Set VBCM = Nothing

End If

On Error GoTo 0

End Sub

Esempio:

ImportModuleCode ActiveWorkbook, "TestModule", "C:\FolderName\NewCode.txt"