Solved

Text Box

Posted on 2002-07-25
7
171 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

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

Accepted Solution

by:
prakashbitra earned 35 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month2 days, 18 hours left to enroll

622 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