Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User Form Template???

I have to create 60 user forms for an excel project. Is there a way t
create a template so that I don't have to keep changing the individua
user form control properties? Thank you in advance for an
suggestions

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default User Form Template???

Sure. Use the form as a class. Make one witha Label1 and a Commandbutton1
and then run this:

Sub Test()
Dim F1 As UserForm1
Dim F2 As UserForm1
Dim F3 As UserForm1
Dim F4 As UserForm1

Set F1 = New UserForm1
F1.Caption = "Hi"
F1.StartUpPosition = 0
F1.Top = 20
F1.Label1.Caption = "One"
F1.CommandButton1.Caption = "One"

Set F2 = New UserForm1
F2.Caption = "Hi"
F2.BackColor = RGB(230, 250, 150)
F2.Label1.Caption = "Two"
F2.CommandButton1.Caption = "Two"

Set F3 = New UserForm1
F3.Caption = "Hi"
F3.Label1.Caption = "3"
F3.CommandButton1.Caption = "3"

Set F4 = New UserForm1
F4.Caption = "Hi"
F4.Height = 500
F4.Label1.Caption = "Quattro"
F4.CommandButton1.Caption = "Quattro"

F1.Show
F2.Show
F3.Show
F4.Show

End Sub

HTH. Best wishes Harald


"novicevbaer " skrev i melding
...
I have to create 60 user forms for an excel project. Is there a way to
create a template so that I don't have to keep changing the individual
user form control properties? Thank you in advance for any
suggestions.


---
Message posted from http://www.ExcelForum.com/



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
Using a template form, advance a form number everytime you open ShoDan Excel Discussion (Misc queries) 1 January 31st 08 01:34 PM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
how to generate a unique form # when using an excel form template PJE Excel Worksheet Functions 1 May 24th 06 11:00 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 12:35 PM.

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

About Us

"It's about Microsoft Excel"