Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default opentext command

I am trying to open a text file as part of the workbook_open event handler.
when i manually import the text by dragging the .dat file into the workbook,
it (correctly) neglects carriage returns within fields, writing them as a
hollow square. However, when I import the text through the VBA command
opentext, it treats the carriage return as if it is the beginning of a new
record and everything goes haywire. are there specific paramters i can pass
in with opentext to have it do what the program does when i drag and drop??
thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default opentext command

Hi,

Open method might be equivalent to dragging a file.
try:
Workbooks.Open "your_file_name.dat"

however, Open method doesn't have the same options as OpenText.
i wonder if it would do what you want actually...

--
HTH,

okaizawa


Ramesh Narasimhan wrote:
I am trying to open a text file as part of the workbook_open event handler.
when i manually import the text by dragging the .dat file into the workbook,
it (correctly) neglects carriage returns within fields, writing them as a
hollow square. However, when I import the text through the VBA command
opentext, it treats the carriage return as if it is the beginning of a new
record and everything goes haywire. are there specific paramters i can pass
in with opentext to have it do what the program does when i drag and drop??
thanks.

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
opentext banavas[_13_] Excel Programming 3 June 28th 04 02:25 PM
User defined file name in an OpenText File command surveyorinva Excel Programming 1 June 8th 04 06:40 PM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM
Workbooks.OpenText Alistair Eberst Excel Programming 2 October 21st 03 12:50 PM
OpenText bug ? Orlando Magalhães Filho Excel Programming 0 August 1st 03 04:14 AM


All times are GMT +1. The time now is 10:37 AM.

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

About Us

"It's about Microsoft Excel"