Quote Originally Posted by truekoa View Post
Ah I'm sorry I don't really understand the code...

Dim Path as String = "C:\...whatever you want" (Which path do I insert here? The main txt file?)


also here:

Dim AllLines() As String = File.ReadAllLines(Path) -> (What do I declare 'File' as?)

I get the gist of everything else, thanks!
Path is a string variable that holds the path and name of the file you want to read the contents of(your file with customer names). So it would contain something like C:\TestInfo\Customers.txt. I said "whatever you want" since I don't know the path and name of file you are using.

You don't declare File as anything. File is a class with a shared method called ReadAllLines and does as it says, reads all the lines of the file and returns the contents in a string array called AllLines. When you use a shared method as opposed to instance methods, you don't have to instantiate the class, just use its name directly with a dot and then the method name.

Let me know if you have any other questions.