'---in Project.xlsm
Sub Test1()
Call LaunchIT(ThisWorkbook.Name, "GetForm1")
End Sub
Sub Test2()
Call LaunchIT(ThisWorkbook.Name, "GetForm2")
End Sub
Function GetForm1() As UserForm1
Set GetForm1 = UserForm1
End Function
Function GetForm2() As UserForm2
Set GetForm2 = UserForm2
End Function
'---In the .xlam file
Public Sub LaunchIT(sWBName As String, sFunctionName As String)
Dim frm As Object
Set frm = Application.Run(sWBName & "!" & sFunctionName)
With frm
.StartUpPosition = 0
.Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
.Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
.Show
End With
End Sub