View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MicMast MicMast is offline
external usenet poster
 
Posts: 2
Default Opening and saving textfile into XLS

Hey reader,

I'm trying to make a chart of a few txt files.
I can open the txt files using:
logtext = InputBox("Give the name of the file to add", "Name of the
LogFile")
logfile = ThisWorkbook.Path & "\" & logtext & ".txt"
Workbooks.OpenText FileName:=logfile, _
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited,
TextQualifier:= _
xlNone, ConsecutiveDelimiter:=True, Tab:=False, Semicolon:=False
_
, Comma:=False, Space:=True, Other:=False, OtherChar:=False

but that opens the txt file and them puts everything in the right
colums and rows. But now I want to save it as an .xls

I tried using thisworkbook.save(path of the file)
but then I saved the file where the button is standing to read the
log...
any ideas?

And one more thing, how do I use the data in the txtfile to make a
chart?
Thx in advance
micmast