LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Worksheet.opentext....???

Is there any way I can open a text file in the workbook that the
macros is running in. Everytime I try with my code it automatically
opens a new workbook. I have looked at other comments for other people
but none of them work because I have a datatype and fieldinfo.

This is my code to open a txt file

Dim UF As Variant
Dim SL As Variant
UF = Application.GetOpenFilename(FileFilter:="TXT Files(*.txt),*.txt",
Title:="log")

Workbooks.OpenText Filename:=UF, DataType:=xlFixedWidth,
FieldInfo:=Array(Array(0, 2))

 
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 neia Excel Programming 0 May 8th 06 04:31 PM
OpenText Mike Archer Excel Programming 1 February 13th 06 09:22 PM
opentext banavas[_13_] Excel Programming 3 June 28th 04 02:25 PM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM
Using Workbooks.OpenText to read a tab-delimited file into a worksheet Dan E[_2_] Excel Programming 0 August 19th 03 08:02 PM


All times are GMT +1. The time now is 10:04 PM.

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"