chris2727272727
Board Regular
- Joined
- Jul 10, 2005
- Messages
- 152
how do you go about calling a module that is not in the workbook that you are using ie one that is in another book
Sub Source_Macro()
Application.Run "TergetWB.xls!Target_Macro"
End Sub
Sub Module()
Dim VBComp As VBIDE.VBComponent
Dim Module As String
On Error Resume Next
Module = InputBox("Put Module Name")
Application.ActiveWorkbook.VBProject.VBComponents.Import ("C:\Documents\" & Module & ".bas")
If Err = "53" Then
MsgBox "Module does not exist!"
End If
End Sub