| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Question about controls |
I will try to simplify. I have a 100 buttons on a form. The buttons
all have unique names and are NOT in an array. The name of each button is
displayed in its caption. There is also a textbox (Text1). When the user
types in the name of one of the hundred buttons (eg. "Command1")
into Text1,
and then presses enter, the caption of the button whose name he typed should
now read "changed".
This is the code I have, but it does not work:
Dim TargetButton As Control
Dim AA As String
AA = Text1.Text
Set TargetButton = AA
TargetButton.Caption = "Changed"
This code comes up with a type mismatch error, and I don't know what to
do. I figure there has got to be a way to hold the name of a button in a
variable. Could someone please help me solve this problem?
-Paul
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com
---
* RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
* RgateImp.MoonDog.BBS at 6/30/04 6:15:55 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)SEEN-BY: 633/267 270 @PATH: 278/230 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.