|
-
Feb 2nd, 2003, 10:08 AM
#1
Thread Starter
Member
[RESOLVED] Importing and Running VB methods from a text file
Hi, i have a problem which may not be possible to achieve, but here it is.
I will write some VB code into a plain text file using Notepad. I then want my proper VB program to open the text file, get all the text from it, then run the VB code obtained in that text.
for example, I might have a plain text file called demo.txt which will contain the following data
VB Code:
Sub showMsg()
MsgBox("this is a message")
End Sub
Now, I want my VB program to open this text file, read the vb code in in, and then run it, thus popping up a message box telling me "this is a message".
Is this possible?
If not, here is another way I might be able to achieve the same result. Would it be possible to write the VB code as a module file instead and dynamically interperate it by my VB program. I don't want to have to link the program and the module together myself, I want the program to link to the module, run it, then unlink from it again.
This would achieve the same purpose, if possible. Are any of these 2 methods possible, and how would I go about coding this?
Thanks for all your help guys, it is very appreciated.
WATTO
[email protected]
http://www.watto.org
Last edited by friendsofwatto; Feb 2nd, 2003 at 07:06 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|