Form Settings

ray_charles

Registered User.
Local time
Today, 18:48
Joined
Aug 5, 2002
Messages
18
Hello: I want to use VB to make a mass change to all
forms and controls changing the Fore Color, Back Color, Border Color, and setting Form Picture to = (none).

Has anyone here ever done this? If so, could you share your
code with me?

Thanks . . . Ray . . .
 
Use a For Each procedure:

Dim ctl as Control
For Each ctl in Forms!FormName
ctl.ForeColor=###
ctl.BackColor=###
' etc.
Next ctl
 
Thank you ! ! !
 
Ok. That works, but, how do I make this so that I can
type in a form name, and have the procedure find the
form entered, then do the for loop setting the properties?

Thanx ray . . . .
 
Setup this procedure in a module

Public Function Properties(frm as Form)

Dim ctl as Control
For Each ctl in frm
ctl.ForeColor=###
ctl.BackColor=###
' etc.
Next ctl

End Function

Then you can put this code in any event in any form. Just set the event to:

=Properties(Forms!FormName)
 

Users who are viewing this thread

Back
Top Bottom