473,425 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

How do I Execute the content of a textbox

Nat
In VB5 I have a textbox containing "cmdText1.Visible = False".

How can I execute this? IOW: How can I hide cmdText1 using the above?

Nat
Jul 17 '05 #1
4 5396

"Nat" <n5******@centurytel.net> wrote in message
news:gq********************@centurytel.net...
In VB5 I have a textbox containing "cmdText1.Visible = False".

How can I execute this? IOW: How can I hide cmdText1 using the above?

Nat


Assuming the name of the text box is TextBox1...
If TextBox1.text = "cmdText1.Visible=False" then
cmdText1.Visible = 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
Jul 17 '05 #2

"Hal Rosser" <hm******@bellsouth.net> wrote in message
news:9X*****************@bignews3.bellsouth.net...
|
| "Nat" <n5******@centurytel.net> wrote in message
| news:gq********************@centurytel.net...
| > In VB5 I have a textbox containing "cmdText1.Visible = 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.Visible = False"
Call ScriptControl1.AddObject(cmdText1.Name, cmdText1)
End Sub

Private Sub Command1_Click()
Call ScriptControl1.ExecuteStatement(Text1.Text)
End Sub


Jul 17 '05 #3
Nat
>> In VB5 I have a textbox containing "cmdText1.Visible = False".

How can I execute this? IOW: How can I hide cmdText1 using the above?

Nat


Assuming the name of the text box is TextBox1...
If TextBox1.text = "cmdText1.Visible=False" then
cmdText1.Visible = False
End If

not what you were hoping for, I know...
JavaScript can execute a string as a Javascript command, but VB can't


Thanks for a good try, Hal.
nat
Jul 17 '05 #4
Nat
In VB5 I have a textbox containing "cmdText1.Visible = False".

How can I execute this? IOW: How can I hide cmdText1 using the
above?

Nat
Actually, you can execute a string in VB, if you use the Microsoft
Script Control:

Private Sub Form_Load()
Text1.Text = "cmdText1.Visible = False"
Call ScriptControl1.AddObject(cmdText1.Name, cmdText1)
End Sub

Private Sub Command1_Click()
Call ScriptControl1.ExecuteStatement(Text1.Text)
End Sub


Ah....now all I have to do is find ScriptControl. (g)
thanks, I'll give it a try.
nat
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ray Choi | last post by:
Hi all, I faced problem on running the server controls. I did two controls: TextBox and Calendar in the page but nothing appears while I start this page on IE. There is no error message. Only...
0
by: George Wei | last post by:
There are 2 pages Default.aspx and Result.aspx: <!-- Default.aspx --> <%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Default.master" CodeFile="Default.aspx.cs"...
1
by: =?Utf-8?B?am9uZWZlcg==?= | last post by:
I keep getting the message after I converted a regular aspx page to now be based on a master page: "Only Content controls are allowed directly in a content page that contains Content controls."...
3
by: MikeB | last post by:
Hello, I have a content page that is from a Master page which has 2 content panes. How do I add my forms to the content page? Each pane needs a form but you can not have multiple form tags nor...
4
by: zacks | last post by:
I am developing a C#.NET application in VS2005 that needs a function that allows the user to edit some text content stored in a Text column in a database. I have a TextBox control with...
7
by: Service4PC | last post by:
Hi all, I've a problem... I'm writing an extension for php, and i need to execute a file php... but only the content of the file and not the file... Now I better explain: - the extension get the...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
2
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html ...
2
by: greenMark | last post by:
Hi All, I'm relatively new to ASP.NET and Visual Web Developer 2008. I'm using a Master page with one content place holder. There is a Cascading Style Sheet file which is being refered by the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.