#1   Report Post  
Posted to microsoft.public.excel.programming
RJH RJH is offline
external usenet poster
 
Posts: 44
Default FindFile

Hello,
I'm using the code below to open a DOC file, then widen one of the columns
before adding the data to a new sheet.
I would like to modify the code to use 'FindFile' to present the browse
window and allow the user to select the file to open.
That said, how would I then code the widening of the 1st row of the selected
sheet before importing? I need to widen the 1st row to keep some name from
being truncated.

Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rhoward\My Documents\CHROMM*.doc", Origin
_
:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:=Array(Array _
(0, 1), Array(21, 1), Array(29, 1), Array(37, 1), Array(44, 1),
Array(52, 1), Array(60, 1), _
Array(68, 1), Array(73, 1))

Thanks for your help!

RJH


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default FindFile

Look at Help for GetOpenFilename

"RJH" wrote:

Hello,
I'm using the code below to open a DOC file, then widen one of the columns
before adding the data to a new sheet.
I would like to modify the code to use 'FindFile' to present the browse
window and allow the user to select the file to open.
That said, how would I then code the widening of the 1st row of the selected
sheet before importing? I need to widen the 1st row to keep some name from
being truncated.

Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rhoward\My Documents\CHROMM*.doc", Origin
_
:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:=Array(Array _
(0, 1), Array(21, 1), Array(29, 1), Array(37, 1), Array(44, 1),
Array(52, 1), Array(60, 1), _
Array(68, 1), Array(73, 1))

Thanks for your help!

RJH



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
Application.FindFile KD[_3_] Excel Programming 1 November 25th 03 03:12 PM


All times are GMT +1. The time now is 08:40 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"