Adding a new file extension for Pipe Delimited files
Phil,
Try this. You can change the last argument of GetOpenFilename to true (and
handle the array) to deal with multiple files names.
Private Sub CommandButton1_Click()
Dim FileName As Variant
FileName = Application.GetOpenFilename("Pipe Separated File (*.psv), *.psv",
, , , False)
If FileName < False Then
Workbooks.OpenText FileName, xlDelimited, TextQualifier:=xlDoubleQuote,
Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar:="|"
End If
End Sub
NickHK
wrote in message
oups.com...
Hi All,
Does anybody know a method so that pipe-delimited-separator text files
can be recognised and handle like CSV files in much the same way ( but
without disturbing CSV handling) ?
My problem is that I have a high volume of standard CSV files and pipe
delimited files. At the moment I have to you the file - import -
delimited | method..
Can this be achieved by adding a new file extension, say *.PCSV which
open and handle like CSV files?
Cheers in advance.
Phil
|