Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Code Required John Calder New Users to Excel 3 October 27th 09 10:29 PM
Form keep the focus unable to get to the code - HELP! Kaz G New Users to Excel 1 January 23rd 08 06:00 PM
Source code for combo box in form shnim1 Excel Discussion (Misc queries) 1 April 14th 06 04:46 AM
close form code tkaplan Excel Discussion (Misc queries) 1 June 3rd 05 10:49 PM
User Form Code mully New Users to Excel 9 May 22nd 05 07:54 PM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"