用PERSONAL.XLSB中更新的模块replace旧模块

我已经在一个工作簿(包含许多模块)中编写了一个vba代码,我需要将包含新代码的存档(如Setup.XLSB)发送给我工作中的其他人。

打开Setup.XLSB并单击一个安装程序button以调用install_new_modules_inside_personal()后,它应该用新的replacePERSONAL.XLSB中的旧模块。

如果用户已经在PERSONAL.XLSB中拥有自己的模块,我不希望它们被删除。 我只是希望我的模块包括新代码replace我的旧名称相同的名称。

Private Sub Install_new_modules_inside_personal() Dim Ver As String Ver = "3" 'Number of version. Insert manually. Dim startupFolder As String startupFolder = Application.StartupPath 'Setup archive check If ActiveWorkbook.Name <> "Setup.XLSB" Then MsgBox ("Error message.") Exit Sub End If 'Version check. This one here is OK. 'Check if PERSONAL.XLSB else save Setup.XLSB as PERSONAL in Application.StartupPath 'export – import code goes here End Sub