ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Load form saved in one work book from another. (https://www.excelbanter.com/excel-programming/347835-load-form-saved-one-work-book-another.html)

Francis Brown

Load form saved in one work book from another.
 
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

--
Regards and Thanks for any assistance.

Francis Brown.

Dave Peterson

Load form saved in one work book from another.
 
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).


Francis Brown wrote:

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

--
Regards and Thanks for any assistance.

Francis Brown.


--

Dave Peterson


All times are GMT +1. The time now is 09:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com