Solved

Run code from text file in vb

Posted on 2016-10-14
1
64 Views
Last Modified: 2016-12-20
I am trying to make an app that when you press a button, it reads a textfile, and executes the code inside it.

I am reading the textfile via streamreader (readtoend) , now i would like to execute the code read from the text file...

I already have my Resources which I could use if needed (below)

INITIAL APPROACH:
I was thinking of replacing the values %111% from teh resources with the info of the streamreader and then executing the code....


any ideas how to do this? tried CodeDom but was not able to make it work.

thank you.
''RESOURCES
Imports System.Net
Imports System.Text.Encoding
Imports System.Net.Sockets
Imports System
Imports System.IO.Ports
Imports System.IO
Imports System.Threading
Imports System.ComponentModel
Imports WindowsApplication1
Imports System.CodeDom
Imports System.CodeDom.Compiler
Imports Microsoft.Win32
Imports Microsoft.Win32
Imports Microsoft.CSharp
Imports Microsoft.VisualBasic
Imports System.IO.File
Imports System.Windows.Forms

Public Class testfromfile
		
		%111%

End Class

Open in new window

0
Comment
Question by:Henry Ottiz
1 Comment
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 41844187
1

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 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