Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
duplicate a user form?
Is it possible to duplicate a user form?
I have one that I want to use twice with only a slight modification. I did not see an option to copy paste from the project section. Thanks Pal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
duplicate a user form?
File Export the form, rename the project one, or the file, and re-import it.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Pal" wrote in message news:DWUjc.8038$RE1.813063@attbi_s54... Is it possible to duplicate a user form? I have one that I want to use twice with only a slight modification. I did not see an option to copy paste from the project section. Thanks Pal |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
duplicate a user form?
"Pal" skrev i melding
news:DWUjc.8038$RE1.813063@attbi_s54... Is it possible to duplicate a user form? I have one that I want to use twice with only a slight modification. Hi Pal Welcome tho the world of classes and objects. Plan a form flexible enough and you can use it for infinite variations. In an empty workbook, create one single Userform1 with CommandButton1 and CommandButton2. Then in a standard module paste and run this: Sub ThreeForms() Dim U1 As UserForm1 Dim U2 As UserForm1 Dim U3 As UserForm1 Set U1 = New UserForm1 U1.BackColor = RGB(0, 0, 255) U1.CommandButton1.Caption = "Yo da man !" U1.CommandButton1.Top = U1.Height / 2 - _ U1.CommandButton1.Height / 2 U1.CommandButton1.Left = U1.Width / 2 - _ U1.CommandButton1.Width / 2 U1.CommandButton2.Visible = False U1.Caption = "Yo da man ?" Set U2 = New UserForm1 U2.BackColor = RGB(210, 255, 175) U2.CommandButton1.Caption = "Absolutely" U2.CommandButton2.Caption = "Neat !" U2.Caption = "Beauty contest" Set U3 = New UserForm1 U3.BackColor = RGB(255, 255, 0) U3.CommandButton1.Caption = "Abort" U3.CommandButton1.BackColor = RGB(255, 0, 0) U3.CommandButton1.Top = 3 U3.CommandButton1.Left = 6 U3.CommandButton2.Top = 25 U3.CommandButton2.Left = 6 U3.CommandButton2.Caption = "Cancel" U3.CommandButton2.BackColor = RGB(255, 0, 0) U3.Caption = "Install Windows XP" U1.Show U2.Show U3.Show End Sub HTH. Best wishes Harald |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
duplicate a user form?
Copy the form to another workbook, rename the copy, then copy it back.
Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Pal" wrote in message news:DWUjc.8038$RE1.813063@attbi_s54... Is it possible to duplicate a user form? I have one that I want to use twice with only a slight modification. I did not see an option to copy paste from the project section. Thanks Pal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User form | Excel Discussion (Misc queries) | |||
User Form Still Trying | New Users to Excel | |||
User Form | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |