Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Caleb
 
Posts: n/a
Default Recognize pipes "|" in when opening a delimited file in Excel

Automatically open delimited files without having the 3-step input box and
include pipes "|" in the delimiting characters.
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

I recorded a macro, tweaked the code a little, and used
the workbook_open event:

Sub Workbook_Open()
Dim sPath As String
Dim sFile As String
sPath = "C:\Documents and Settings\jmorin\Desktop\"
sFile = "test.txt"
Workbooks.OpenText Filename:= _
sPath & sFile, _
Origin:=437, _
StartRow:=1, _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, _
Semicolon:=False, _
Comma:=False, _
Space:=False, _
Other:=True, _
OtherChar:="|"
End Sub

---
Change sPath and sFile to your actual path and file. To
use this macro, save it in ThisWorkbook module (Press
ALT+F11). Save the file and close. Re-open.

HTH
Jason
Atlanta, Ga

-----Original Message-----
Automatically open delimited files without having the 3-

step input box and
include pipes "|" in the delimiting characters.
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble opening an Excel file that contains macros JohnR Excel Worksheet Functions 1 March 8th 05 08:09 PM
How do I export XLS to TXT delimited by '|'? Mohsin Ghani Excel Discussion (Misc queries) 2 February 11th 05 03:36 AM
Comma delimited bank info [email protected] Excel Discussion (Misc queries) 4 January 25th 05 10:55 AM
restrict opening Excel file residing on a shared drive to one user k-ham Excel Discussion (Misc queries) 1 January 7th 05 01:57 AM
Slow opening files - possible cause and solutoin Bob Flanagan Excel Discussion (Misc queries) 0 November 29th 04 10:04 PM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"