load userform from other VBProject (Excel 2000)

  • Thread starter Thread starter Fero Bokor
  • Start date Start date
F

Fero Bokor

Hi all,

is it possible to load (to show) a UserForm from other VBAProject ?
There is a Reference between ActiveVBProject and the other VBAProject .
Thanks a lot ...

Fero
 
I put a sub in the first workbook that shows the userform.

Option Explicit
Sub Macro2()
UserForm1.Show
End Sub

In the calling workbook, I could do this:

Option Explicit
Sub Macro1()

' without a reference, I could use application.run
' Dim otherwkbk As Workbook
' Set otherwkbk = Workbooks("book1.xls")
' Application.Run otherwkbk.Name & "!macro2"

' with a reference, I could just call that macro
Call macro2

End Sub
 
Back
Top