Home All Groups Group Topic Archive Search About

creating code on the fly at runtime

Author
10 Jun 2006 12:18 PM
gyoder
what is the prefered method of creating a VB function or subroutine on the
fly at runtime. for example:

a user types in a function at runtime into a text field. then the user wants
to evaluate the function. the function may contain variables that the user
will enter just before execution. the function would be standard VB code. is
it possible to create VB code, build it and then execute it from within my
running VB program?

thanks

Author
10 Jun 2006 4:39 PM
Ken Tucker [MVP]
Hi,

       Maybe this will help.
http://msdn.microsoft.com/msdnmag/issues/05/12/CodeGeneration/default.aspx

Ken
-----------------

Show quoteHide quote
"gyoder" wrote:

> what is the prefered method of creating a VB function or subroutine on the
> fly at runtime. for example:
>
> a user types in a function at runtime into a text field. then the user wants
> to evaluate the function. the function may contain variables that the user
> will enter just before execution. the function would be standard VB code. is
> it possible to create VB code, build it and then execute it from within my
> running VB program?
>
> thanks
>
>
>
Author
10 Jun 2006 11:11 PM
gyoder
thanks. i've looked at the link and it looks interesting.


Show quoteHide quote
"Ken Tucker [MVP]" <KenTucker***@discussions.microsoft.com> wrote in message
news:9F2A47BF-80ED-4F5B-A5F7-AC5DC7D72E56@microsoft.com...
> Hi,
>
>       Maybe this will help.
> http://msdn.microsoft.com/msdnmag/issues/05/12/CodeGeneration/default.aspx
>
> Ken
> -----------------
>
> "gyoder" wrote:
>
>> what is the prefered method of creating a VB function or subroutine on
>> the
>> fly at runtime. for example:
>>
>> a user types in a function at runtime into a text field. then the user
>> wants
>> to evaluate the function. the function may contain variables that the
>> user
>> will enter just before execution. the function would be standard VB code.
>> is
>> it possible to create VB code, build it and then execute it from within
>> my
>> running VB program?
>>
>> thanks
>>
>>
>>
Author
11 Jun 2006 5:44 AM
Cor Ligthert [MVP]
Gyoder,

In addition to Ken if some simple evalutation is important than you can as
well use this.

http://www.vb-tips.com/default.aspx?ID=34241f3e-16ff-4e87-86d1-2b03e1a439ae

I hope this helps,

Cor

Show quoteHide quote
"gyoder" <georgeyo***@comcast.net> schreef in bericht
news:ePadnbMzytIGJRfZnZ2dnUVZ_rKdnZ2d@comcast.com...
> what is the prefered method of creating a VB function or subroutine on the
> fly at runtime. for example:
>
> a user types in a function at runtime into a text field. then the user
> wants to evaluate the function. the function may contain variables that
> the user will enter just before execution. the function would be standard
> VB code. is it possible to create VB code, build it and then execute it
> from within my running VB program?
>
> thanks
>
Author
11 Jun 2006 12:35 PM
gyoder
thanks. very interesting. between the two of these ideas i may be able to
accomplich what im trying to do. thanks for all your help.


Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uqt6fnRjGHA.744@TK2MSFTNGP04.phx.gbl...
> Gyoder,
>
> In addition to Ken if some simple evalutation is important than you can as
> well use this.
>
> http://www.vb-tips.com/default.aspx?ID=34241f3e-16ff-4e87-86d1-2b03e1a439ae
>
> I hope this helps,
>
> Cor
>
> "gyoder" <georgeyo***@comcast.net> schreef in bericht
> news:ePadnbMzytIGJRfZnZ2dnUVZ_rKdnZ2d@comcast.com...
>> what is the prefered method of creating a VB function or subroutine on
>> the fly at runtime. for example:
>>
>> a user types in a function at runtime into a text field. then the user
>> wants to evaluate the function. the function may contain variables that
>> the user will enter just before execution. the function would be standard
>> VB code. is it possible to create VB code, build it and then execute it
>> from within my running VB program?
>>
>> thanks
>>
>
>