Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy form and code question
I need a new form. In that project there is already a form
very similar to the new one I need. Rather than build it from scratch, is there a way to copy the form (and code behind it) and rename it. Then I'd only have to make the neccessary changes? Is the best way to export it, then rename it, then import it back into the project? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy form and code question
Hi Stuart,
There's actually a very simple way to do this. Open a new blank workbook in Excel. Switch back to the Visual Basic Editor and add the UserForm you want to copy to the VBProject of the new blank workbook. You can do this by selecting the UserForm in the Project window and then dragging and dropping it onto the project of the new blank workbook. In the new blank workbook, rename the UserForm, then drag and drop it back into the original project. Finally, close the intermediate workbook without saving. You'll now have a new copy of your UserForm with a different name in the original project. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Stuart" wrote in message ... I need a new form. In that project there is already a form very similar to the new one I need. Rather than build it from scratch, is there a way to copy the form (and code behind it) and rename it. Then I'd only have to make the neccessary changes? Is the best way to export it, then rename it, then import it back into the project? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy form and code question
Many thanks.
I thought there must be an easier way. Regards. "Rob Bovey" wrote in message ... Hi Stuart, There's actually a very simple way to do this. Open a new blank workbook in Excel. Switch back to the Visual Basic Editor and add the UserForm you want to copy to the VBProject of the new blank workbook. You can do this by selecting the UserForm in the Project window and then dragging and dropping it onto the project of the new blank workbook. In the new blank workbook, rename the UserForm, then drag and drop it back into the original project. Finally, close the intermediate workbook without saving. You'll now have a new copy of your UserForm with a different name in the original project. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Stuart" wrote in message ... I need a new form. In that project there is already a form very similar to the new one I need. Rather than build it from scratch, is there a way to copy the form (and code behind it) and rename it. Then I'd only have to make the neccessary changes? Is the best way to export it, then rename it, then import it back into the project? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Form Code Required | New Users to Excel | |||
Form keep the focus unable to get to the code - HELP! | New Users to Excel | |||
Source code for combo box in form | Excel Discussion (Misc queries) | |||
close form code | Excel Discussion (Misc queries) | |||
User Form Code | New Users to Excel |