|
-
April 13th, 2001, 07:00 AM
#1
help
i want my user to type some code in a text box at the run time. and i want the code to execute on the click event of a command button.how can i do it?thanks a lot in advance for any reply.
-
April 13th, 2001, 07:39 AM
#2
Re: help
Vb code will be a bit hard...If it is a Sql statement, you can do easily. What exactly are you looking for?
Now, take this suggestment: do not post a question with title "Help", as it means nothing. Better to write a title related to the matter (ie, in this case:
"exec code as string" or something similar).
Best regards,
Cesare Imperiali
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 13th, 2001, 11:18 AM
#3
Re: help
have a look at this: it may help you.
http://codeguru.earthweb.com/cgi-bin...age=&view=&sb=
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 13th, 2001, 01:23 PM
#4
Re: help
Put two textboxes and a command button on a form.
The following runs the Windows Calculator when you
type calc.exe in the first text box, don't include
any quotation marks! After you close the calculator you will see the complete string in the
second text box. I don't know if this is exactly what you are trying to do or not but you can get some ideas from it. Remember that all you have to
do to activate a command button via code is to put
"CommandButtonName_Click" or
"CommandButtonName = True"
anywhere in your project. Good Luck!
option Explicit
Dim a as string
Dim b as string
private Sub Command1_Click()
a = Text1.Text
b = "c:\windows\" + a
Text2.Text = b
Shell b
End Sub
-
April 13th, 2001, 01:23 PM
#5
Re: help
Put two textboxes and a command button on a form.
The following runs the Windows Calculator when you
type calc.exe in the first text box, don't include
any quotation marks! After you close the calculator you will see the complete string in the
second text box. I don't know if this is exactly what you are trying to do or not but you can get some ideas from it. Remember that all you have to
do to activate a command button via code is to put
"CommandButtonName_Click" or
"CommandButtonName = True"
anywhere in your project. Good Luck!
option Explicit
Dim a as string
Dim b as string
private Sub Command1_Click()
a = Text1.Text
b = "c:\windows\" + a
Text2.Text = b
Shell b
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|