can u run code from inside a text box
can u run code from inside a text box
if you have the code
Msgbox Text1.text
and in the TextBox you have the word now then the word not is displayed in the message box. I want the time to be displyed in the Message Box
I know I can do a MsgBox Now but I want it to grab and run the code from in the textbox
Re: can u run code from inside a text box
I've never tried it but maybe this thread will help?
Re: can u run code from inside a text box
Assuming someone will free hand type stuff into the text box, and you want to "execute" it, you definately need to error trap that routine. It is very, very likely that what is typed in the textbox could turn out to be invalid in Visual Basic.
Re: can u run code from inside a text box
The scripting control would be the more elaborate way but you should also think about making your app dynamic so it would act upon varable contents which would be populated by the textbox or other control options.