Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Text Box

Posted on 2002-07-25
7
Medium Priority
?
172 Views
Last Modified: 2011-08-18
If I  know name of textbox .And it's contain in some string.

For example,
dim str1 as String
str1="Text1" ' (Name of TextBox)
Now ,how can I get all the properties of this textbox?
0
Comment
Question by:irina_1973
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 2

Expert Comment

by:ventond
ID: 7177660
Forget str1.

Text1.text - The visible test
Text1.Backcolor
Text1.Left


etc
0
 
LVL 2

Expert Comment

by:ventond
ID: 7177663
To clarify you might say something like

str1 = Text1.Text
or
Text1.Text = str1

0
 
LVL 6

Expert Comment

by:marconovaro
ID: 7177682

You can access the text1 control using the "controls" collection. For instance, if you have a form and a textBox named Text1, you can use something like this:

Me.Controls("Text1").Text = "ABC"

to access the properties of the textbox named "Text1". If you have that name on a string, you can use:

Me.Controls(myStringName).<Property>

Hope this helps....
Marco
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:irina_1973
ID: 7177781
thanks to everybody
0
 
LVL 1

Accepted Solution

by:
prakashbitra earned 140 total points
ID: 7178034
Me.Controls(str1).Text = <value>

will work try this..
0
 
LVL 2

Expert Comment

by:ventond
ID: 7178694
Prakashbitra,
   Yes, it will work. But why do all that extra typing?(And make the computer do the extra work?)

0
 
LVL 6

Expert Comment

by:marconovaro
ID: 7183720
My answer was correct, too :(
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question