"Nat" <n515hoop@centu rytel.net> wrote in message
news:gqCdnR8_P9 AczV7cRVn-ug@centurytel.n et...[color=blue]
> In VB5 I have a textbox containing "cmdText1.Visib le = False".
>
> How can I execute this? IOW: How can I hide cmdText1 using the above?
>
> Nat
>[/color]
Assuming the name of the text box is TextBox1...
If TextBox1.text = "cmdText1.Visib le=False" then
cmdText1.Visibl e = False
End If
not what you were hoping for, I know...
JavaScript can execute a string as a Javascript command, but VB can't
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.818 / Virus Database: 556 - Release Date: 12/17/2004
"Hal Rosser" <hmrosser@bells outh.net> wrote in message
news:9XPwd.2695 $3X5.2069@bigne ws3.bellsouth.n et...
|
| "Nat" <n515hoop@centu rytel.net> wrote in message
| news:gqCdnR8_P9 AczV7cRVn-ug@centurytel.n et...
| > In VB5 I have a textbox containing "cmdText1.Visib le = False".
| >
| > How can I execute this? IOW: How can I hide cmdText1 using the
above?
| >
| > Nat
| >
|
|
| not what you were hoping for, I know...
| JavaScript can execute a string as a Javascript command, but VB can't
|
Actually, you can execute a string in VB, if you use the Microsoft
Script Control:
Private Sub Form_Load()
Text1.Text = "cmdText1.Visib le = False"
Call ScriptControl1. AddObject(cmdTe xt1.Name, cmdText1)
End Sub
Private Sub Command1_Click( )
Call ScriptControl1. ExecuteStatemen t(Text1.Text)
End Sub
>> In VB5 I have a textbox containing "cmdText1.Visib le = False".[color=blue][color=green]
>>
>> How can I execute this? IOW: How can I hide cmdText1 using the above?
>>
>> Nat
>>[/color]
>
> Assuming the name of the text box is TextBox1...
> If TextBox1.text = "cmdText1.Visib le=False" then
> cmdText1.Visibl e = False
> End If
>
> not what you were hoping for, I know...
> JavaScript can execute a string as a Javascript command, but VB can't[/color]
[color=blue][color=green]
>> In VB5 I have a textbox containing "cmdText1.Visib le = False".
>>
>> How can I execute this? IOW: How can I hide cmdText1 using the
>>above?
>>
>> Nat[/color][/color]
[color=blue]
> Actually, you can execute a string in VB, if you use the Microsoft
> Script Control:
>
> Private Sub Form_Load()
> Text1.Text = "cmdText1.Visib le = False"
> Call ScriptControl1. AddObject(cmdTe xt1.Name, cmdText1)
> End Sub
>
> Private Sub Command1_Click( )
> Call ScriptControl1. ExecuteStatemen t(Text1.Text)
> End Sub[/color]
Ah....now all I have to do is find ScriptControl. (g)
thanks, I'll give it a try.
nat
Comment