Hello,
I have a subprocedure that changes the background for all text objects on a form. Currently I have it set up like this:
public sub chngcolor()
with form1
.txtbox1.backcolor = thewhitecolor
.txtbox2.backcolor = the whitecolor
etc...
end with
What I would like to do is make this more general.
I would like to make a function that you pass the forms name in and for every text oject on the form the function changes the background color. The trouble I am having is finding information on how I reference every text object on the form without specifically listing the name. I believe this is object oriented programing that I am attempting.
Can someone help?
I have a subprocedure that changes the background for all text objects on a form. Currently I have it set up like this:
public sub chngcolor()
with form1
.txtbox1.backcolor = thewhitecolor
.txtbox2.backcolor = the whitecolor
etc...
end with
What I would like to do is make this more general.
I would like to make a function that you pass the forms name in and for every text oject on the form the function changes the background color. The trouble I am having is finding information on how I reference every text object on the form without specifically listing the name. I believe this is object oriented programing that I am attempting.
Can someone help?