Solved

Run code from text file in vb

Posted on 2016-10-14
1
73 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending receiving text messages in vb.net 15 49
VB.Net Determine if a mapped network drive exists 2 32
ASP.NET (VB) return a record 2 40
Access/Visual Basic Question 3 29
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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