Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application.FindFile | Excel Programming |