PDA

View Full Version : userform



chungtinhlak
02-24-2009, 08:06 PM
I have many workbook open in open instances of excel. One of the workbook has a userfrom, I want to be able to hit esc to launch the userfrom in any activeworkbook/sheets. This is possible, it doesn't have to be esc, it can be a shortcut. Can someone help me with...

thanks

Bob Phillips
02-25-2009, 01:24 AM
I would re-phrase that in a bit more detail, I for one am not clear what you mean.

chungtinhlak
02-25-2009, 07:14 AM
Sorry. Let see I have 1 workbook where I a userform and all the formula saved. While this workbook is open. I open other workbook wanting to use the same macros and userfrom on this newly open workbook. Is there a way to call the userfrom using shortcut key or ESC button to this newly open workbook while the workbook where the userform and macros is stored is not active?

Thanks

Bob Phillips
02-25-2009, 07:36 AM
Yes, you can either set a reference to the other workbook and call its procedures directly, or use Application.Run.

chungtinhlak
02-25-2009, 08:36 AM
thanks xld, can you give me an example?

Bob Phillips
02-25-2009, 10:04 AM
Of which? Set a reference is an action in the VBIDE, Applicatuion.Run is covered in help.

chungtinhlak
02-25-2009, 10:30 AM
set reference action. application.run i have to go in and write a macro for it right.

I can call it (( Userform)) with a shortcut key on an active workbook that doesn't contain the form.

thanks

Bob Phillips
02-25-2009, 11:00 AM
Sorry, I don't understand that comment.