Help. where's the #@%$&^ userform?

J

John

I have a macro with userform and textbox. I want to copy the macro and
insert it in another workbook. I can copy the subs ok but where is the
userform and textbox?

I managed to create this beast but have no idea why it even works.
There's an ok button macro, a starting macro, a "call" to the userform.

userform.listbox... what does that mean? Show what? where's the form or
box template or whatever. I don't see it anywhere. But bingo... there it
is when I need it. I remember creating it but I don't remember saving it
anywhere. Very confusing.

The there is userform.show. Where is the d* userform that is being
shown? It's not in the macro list anywhere. How do I copy it and save it
etc.

help


John
 
C

Corey

The Listbox vba code fromt he userform etc will be found by double clicking
on the userform, not looking in a module.
 
U

UpRider

In the VBA editor, click View - Project Explorer. You can find everything
there.

HTH, UpRider
 
J

JLGWhiz

The UserForm is not part of the worksheet. It exists at the application
level within a workbook VBA project. When you want it to appear you use the
..Show command and to put it away you can use Hide to leave it open but not
visible or you can Unload it to remove it from active memory. Once created,
it can be accessed for modification by pressing Alt + F11 to open the VBE and
it will be listed in the Project Window at the upper left side of the code
module window. You can right click the UserForm name and then select from a
pop up menu to view the object or to view the code.
 
J

John

Thanks. I didn't know that. But how can I copy or save it somewhere so I
can get it into another workbook?

I have the development workbook I use for development and dinging around
and the working workbook that gets used. Having developed the macro that
uses the UserForm in the development workbook, how do I move it to the
working workbook?

thanks
John
 
G

Gord Dibben

Select the form by name under Forms in your Project

Right-click and "Export File"

It will export as a *.frm file

Import that *.frm file into your working workbook.


Gord Dibben MS Excel MVP
 
J

JLGWhiz

Hi John, I had trouble getting back into the web site. Don't know what
happens at the MS communities site but every so often it goes berserk.
Anyhow, the easy way to copy or export or import a userform from one workbook
to another is to open both workbooks, then open the VB editor (Alt + F11) and
in the Project window, use the mouse to drag the form from one project and
drop it into the other. The VB editor will display the projects for all open
workbooks so be careful if more than two workbooks are open that you drop the
form in the correct project for the correct workbook. But this is the
easiest of all methods that I have found.
 
J

John

That worked great, thanks.
John
Hi John, I had trouble getting back into the web site. Don't know what
happens at the MS communities site but every so often it goes berserk.
Anyhow, the easy way to copy or export or import a userform from one workbook
to another is to open both workbooks, then open the VB editor (Alt + F11) and
in the Project window, use the mouse to drag the form from one project and
drop it into the other. The VB editor will display the projects for all open
workbooks so be careful if more than two workbooks are open that you drop the
form in the correct project for the correct workbook. But this is the
easiest of all methods that I have found.
 

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

Top