SAKYA
April 13th, 2001, 07:00 AM
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.
|
Click to See Complete Forum and Search --> : help SAKYA April 13th, 2001, 07:00 AM 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. Cimperiali April 13th, 2001, 07:39 AM 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. Cimperiali April 13th, 2001, 11:18 AM have a look at this: it may help you. http://codeguru.earthweb.com/cgi-bin/bbs/wt/showpost.pl?Board=vb&Number=37959&page=&view=&sb= Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru. johnpc7 April 13th, 2001, 01:23 PM 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 johnpc7 April 13th, 2001, 01:23 PM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |