Load form saved in one work book from another.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is this possible.

I Have two workbooks.

Master.xls and Slave.xls

Is it possible to call a form called MainMenu in Master.xls from a button on
a sheet in Slave.xls
 
You could have a subroutine in master.xls that shows the form:

Option explicit
sub ShowTheForm()
mainmenu.show
end sub

Then you could have a macro assigned to that commandbutton (from the control
toolbox toolbar) that does the actual call.

option explicit
Private Sub CommandButton1_Click()
application.run "master.xls!showtheform"
end sub

You could also assign this kind of macro to a button from the Forms toolbar.

Or with the forms toolbar, you could just assign the macro in the master.xls
workbook directly (rightclick and assign macro).

======
If you use the application.run stuff, then master.xls will have to be open. If
you assign the macro to the forms button, then excel will open master.xls (if
it's not already open).
 

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