Executing a function() during runtime 
Author Message
 Executing a function() during runtime

Hello,
I once saw a VB sample executing a function or a sub
in runtime. I was wondering how it is done because
I am working on a program which allows the user
to key in a command (function) into a textbox and
gets the output in separate textbox. Somewhat like
a console program.

Thanks in advance.

Kian Yang



Sun, 31 Dec 2000 03:00:00 GMT  
 Executing a function() during runtime
Call {function name}
Quote:

>Hello,
>I once saw a VB sample executing a function or a sub
>in runtime. I was wondering how it is done because
>I am working on a program which allows the user
>to key in a command (function) into a textbox and
>gets the output in separate textbox. Somewhat like
>a console program.

>Thanks in advance.

>Kian Yang



Sun, 31 Dec 2000 03:00:00 GMT  
 Executing a function() during runtime

Quote:

> Call {function name}


> >Hello,
> >I once saw a VB sample executing a function or a sub
> >in runtime. I was wondering how it is done because
> >I am working on a program which allows the user
> >to key in a command (function) into a textbox and
> >gets the output in separate textbox. Somewhat like
> >a console program.

> >Thanks in advance.

> >Kian Yang

I don't think you understood the question.  A case statement is going to
be needed since the functions will be called based on a string value.

Select Case (strFunctionName)
  Case "Function1": Call Function1()
  Case "Function2": Call Function2()
  Case "Function3": Call Function3()
End Select

There's no other way to do it since the string commands you enter, even
though they are function names, are obviously not compiled.

Boden Larson
SGM Biotech, Inc.
(406) 582-0457



Mon, 01 Jan 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Executing a function during runtime

2. Getting the function's name during runtime while running in the scope of the function

3. Executing a string as a VB cmd during runtime

4. Retrieve name of Function, Sub, Class, Property etc from within that item during runtime

5. Executing Function using String Containing Function Name

6. execute a variable as a function/sub procedure (like eval function in java(script))

7. Form_load executing during shutdown

8. ocx code executes during vbg compilation ! (VB6)

9. Recordsaffected during async execute

10. Visual Studio Installer -- Custom .exe file to be executed during installation

11. How do I hide a query during runtime

12. Check for controls on form during Runtime

 

 
Powered by phpBB® Forum Software