Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to associate a text-box control and a label using VBA?

Status
Not open for further replies.

sudakov

Programmer
Jun 17, 2007
53
US
Hi everyone,

does anybody know how to associate a text-box control and a label control using VBA?

I use CreateControl method to create programmaticaly a text-box control and a label control in a form.
I try to associate them using the following:
Code:
Forms("MyForm").Controls("MyControl").Controls(0) = _
Forms("MyForm").Controls("MyLabel")

It doesn't work.

Any help is appreciated.

Sudakov
 
Hi everybody,

I have found an answer to my question:

parameter PARENT of method CreateControl should be used when creating a label control.

Sudakov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top