I'm going to ignore the FileDialog for now. You can incorporate it into your program—it's often very useful—but in order to keep things simple at first, let's assume for this discussion that you already know the full path and filename the file you're going to read. I'm guessing your problem is that you haven't yet defined the object that I called "fso"; that is, the statement "Set fo = fso.OpenTextFile(Fname, 1)" is correct enough, but when VBA gets that far it finds it doesn't know what fso is. It isn't built into VBA as the name of the FileSystemObject; you have to define it.
Depending on whether you want to define it in the References window (I think they call this "early binding"), there are two ways to do it. If you define it in the References—I think it's it more than one of the libraries that have "Scripting" in their titles—then you can just do this:
Code:
Set fso = New FileSystemObject
Otherwise you have to use the CreateObject function:
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Either one works; the only difference (I think) is that "early binding" allows you to use the built-in enumerations, eg "ForReading" instead of 1. I do a lot of VBS, too, so I use either one pretty casually.
Once you've got the fso object defined—and you don't have to call it "fso", you can give it any variable name you choose—then your program should proceed normally. I think.