change code on runtime

Posted on 2006-06-04
Last Modified: 2010-04-30

Basically what i want to do is this:

add a textbox and a button on a form

now type in the textbox >msgbox "hello"<
(without the > <)

now when pressing the button, the code in the textbox gets executed.

is there a native way of doing this?

(i am aware that i can hardcode all actions, or can use an ocx, i'm not looking for a solution like that)
Question by:Mark_FreeSoftware
    LVL 142

    Accepted Solution

    LVL 13

    Author Comment


    that does perfecty what i want!

    but is it available on all computers or should i distribute it with my app?
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    Check out what dll the "Microsoft Script Control" references to in the Project References, and you will see that it's a dll that is available on all computers with IE and Office (among others).
    In Windows 2003 Server it is not available if I remember correctly.
    Notice that if you provide the dll along with your .exe (into the same folder), and ensure it get's registered, your project will work fine.
    LVL 13

    Author Comment

    ok thank you!

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now