How to load/show UserForm from other Workbook

  • Thread starter Thread starter halimnurikhwan
  • Start date Start date
H

halimnurikhwan

Hi all,

I have a problem to load or show my userform in book1,
but all I want is open it from book2 via VBA

Is there way except call the macro in book1 from book2

I want it open from book2 directly ..

Thanks if you help me...

Rgds, halim
 
Create a subroutine in Book1.xls's project that shows the userform:

Option Explicit
sub showtheform()
userform1.show
end sub

Then in Book2.xls's project, you can call that subroutine:

option explicit
sub ShowTheFormFromBook1()
application.run "'" & "book1.xls" & "'" & "!showtheform"
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top