jhardy325
Technical User
- Feb 9, 2009
- 4
Hey Guys-
So I am trying to create a form that requests the user to select a flat text file that has a unique value per line, i.e...
test1
test2
test3
test4
...
test11
I have the select file portion executing properly
SET objCMN = CreateObject("Useraccounts.CommonDialog")
DIM objCMN
objCMN.Filterindex = 1
intResult = objCMN.Showopen
Wscript.echo objCMN.FileName
But when I go to use the objCMN.FileName in a split statement, everything goes wrong.
Please understand that I haven't had to do an scripting for about 9 years, so for all intensive purposes, I am NEW!!
Here is the code I am using to try and split the data into an array
fileName = objDialog.FileName
serverName = SPLIT(objFSO.OpenTextFile(fileName).ReadAll(), vbCrLf,-1,1)
I am know that I am way off on this, but I have tried probably a dozen different things and this is all I have left. Any help would be great!
Thanks!
So I am trying to create a form that requests the user to select a flat text file that has a unique value per line, i.e...
test1
test2
test3
test4
...
test11
I have the select file portion executing properly
SET objCMN = CreateObject("Useraccounts.CommonDialog")
DIM objCMN
objCMN.Filterindex = 1
intResult = objCMN.Showopen
Wscript.echo objCMN.FileName
But when I go to use the objCMN.FileName in a split statement, everything goes wrong.
Please understand that I haven't had to do an scripting for about 9 years, so for all intensive purposes, I am NEW!!
Here is the code I am using to try and split the data into an array
fileName = objDialog.FileName
serverName = SPLIT(objFSO.OpenTextFile(fileName).ReadAll(), vbCrLf,-1,1)
I am know that I am way off on this, but I have tried probably a dozen different things and this is all I have left. Any help would be great!
Thanks!