Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
is there anyone can help me, I need make simple macro program. I have a text file, inside this txt file there is certain code. Example there is code 30 on line 10-15. I need a program that copy line 10-15 and create a new file with the content only line 10 until 15 only. Thanks all your help guys. Best regards |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
use datafilterautofilterrecord a macro
-- Don Guillett SalesAid Software "Richard" wrote in message ... Hi all, is there anyone can help me, I need make simple macro program. I have a text file, inside this txt file there is certain code. Example there is code 30 on line 10-15. I need a program that copy line 10-15 and create a new file with the content only line 10 until 15 only. Thanks all your help guys. Best regards |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is a link to sample code to read and write delimited files:
http://www.cpearson.com/excel/imptext.htm import/export text files here is sample code to read in a text file: Sub ReadStraightTextFile() Dim sStr as String Dim LineofText As String Dim rw as Long rw = 0 Open "C:\FILEIO\TEXTFILE.TXT" For Input As #1 sStr = "" Do While Not EOF(1) Line Input #1, LineofText sStr = sStr & lineofText if len(sStr) = 178 then rw = rw + 1 cells(rw,1).Value = sStr sStr = "" End if Loop 'Close the file if len(sStr) 0 then cells(rw,1).Value = sStr End if Close #1 End Sub Here are other sources of information: http://support.microsoft.com/default...b;en-us;151262 Working with Sequential Access Files http://www.applecore99.com/gen/gen029.asp -- Regards, Tom Ogilvy "Richard" wrote in message ... Hi all, is there anyone can help me, I need make simple macro program. I have a text file, inside this txt file there is certain code. Example there is code 30 on line 10-15. I need a program that copy line 10-15 and create a new file with the content only line 10 until 15 only. Thanks all your help guys. Best regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to create a macro button to exit a program | Excel Worksheet Functions | |||
create a slides show with excell spreadsheets using excell | Charts and Charting in Excel | |||
How do I use info from an excel program and make file labels? | Setting up and Configuration of Excel | |||
how do i create a short cut on my desktop for a excell file? | Excel Discussion (Misc queries) | |||
How to I create a macro in Excell to add multiple worksheets? | Excel Programming |