Connecting Tech Pros Worldwide Forums | Help | Site Map

Refering to a Control by Name In Code

D Miller
Guest
 
Posts: n/a
#1: Dec 27 '05
This might be a pretty basic question... How do I refer to a control by
name as a variable?

For instance I have 90 controls is a row named C1 though C90 and I want to
have focus shifted from say C11 to C20 by code. The target name would have
to be a variable.


Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#2: Dec 27 '05

re: Refering to a Control by Name In Code


"D Miller" <demiller2002@yahoo.com> schrieb:[color=blue]
> This might be a pretty basic question... How do I refer to a control by
> name as a variable?
>
> For instance I have 90 controls is a row named C1 though C90 and I want to
> have focus shifted from say C11 to C20 by code. The target name would have
> to be a variable.[/color]

Accessing controls by their names or indices
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=controlbynameindex&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

I Don't Like Spam
Guest
 
Posts: n/a
#3: Dec 27 '05

re: Refering to a Control by Name In Code


D Miller wrote:[color=blue]
> This might be a pretty basic question... How do I refer to a control by
> name as a variable?
>
> For instance I have 90 controls is a row named C1 though C90 and I want to
> have focus shifted from say C11 to C20 by code. The target name would have
> to be a variable.
>
>[/color]

Do a google search on "vb.net Get control by name" and you will get many
examples of this.

Chris
Closed Thread


Similar Visual Basic .NET bytes