View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
StephanieH StephanieH is offline
external usenet poster
 
Posts: 95
Default Opening files with a input box


MyValue = InputBox("Enter Date ___ MMDDYY", "Title")

Workbooks.OpenText Filename:= _
"\\scdff001\pdrive\REMARKETING\Weekly
Reports\LM273(AgingOfInv)\Text Files\LM273 " & MyValue & ".TXT" & "" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:= _
Array(Array(0, 1), Array(13, 1), Array(15, 1), Array(29, 1),
Array(46, 9), Array(64, 1), _
Array(66, 1), Array(76, 9), Array(128, 1)),
TrailingMinusNumbers:=True




"mk389" wrote:


Hi,

Right now I have

ChDir _
"\\scdff001\pdrive\REMARKETING\Weekly
Reports\LM273(AgingOfInv)\Text Files"
Workbooks.OpenText Filename:= _
"\\scdff001\pdrive\REMARKETING\Weekly
Reports\LM273(AgingOfInv)\Text Files\LM273 111304.TXT" & "" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:= _
Array(Array(0, 1), Array(13, 1), Array(15, 1), Array(29, 1),
Array(46, 9), Array(64, 1), _
Array(66, 1), Array(76, 9), Array(128, 1)),
TrailingMinusNumbers:=True

That imports a text file and arranges them in a rows and deletes
information I dont want.

What I want to do is modfiy the file name with a input box.

How would I do that.

Thanks,
mk


--
mk389
------------------------------------------------------------------------
mk389's Profile: http://www.excelforum.com/member.php...o&userid=15272
View this thread: http://www.excelforum.com/showthread...hreadid=318811