473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to print a file seperately

17
hai friends,

i really want to know how to read a file seperately. that means i want to read and print first 24 lines then if i click the next button i will read and print tihe next 24 lines. try to post ur replies.
Mar 11 '08 #1
1 990
jeffstl
432 Expert 256MB
hai friends,

i really want to know how to read a file seperately. that means i want to read and print first 24 lines then if i click the next button i will read and print tihe next 24 lines. try to post ur replies.

Something along these lines, you need to declare your FSO , etc still though.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Open FilePath For Input As MyFile
  3. Do While Not EOF(MyFile)
  4.    For x=0 to 23
  5.       Line Input #MyFile, sNextLine
  6.       sNextLine = sNextLine & vbCrLf
  7.       sText = sText & sNextLine
  8.    Next x
  9.    'some code for whatever
  10. Loop
  11.  
  12.  
  13.  
You might run into some problems though hitting the end of the file in the middle of a for next loop.

You might want to research all the methods in the FSO to handle these problems and trap them as they occur.
Mar 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: action! | last post by:
this is my C Programming homework, It wants me to input 10! and output the follow result 10! ¡õ 10 * 9! ¡õ 9 * 8! ..................
12
by: Tobias Froehlich | last post by:
Hi, I have a form called form1 on which there are a lot of checkBoxes (they form a 8x6 field). I'd like to create a class in a seperate .cs file which gives some control over these checkBoxes...
2
by: Balamurali C | last post by:
Hi All I'm having one problem, since im debuging this last one week I'm not able to do. Problem: In my webage I have two Frames(top & bottom) in the top frame I'm displaying some...
17
by: poison.summer | last post by:
Hi I have a char p, I'd like to print out the lower 4 bits and higher 4 bits of p seperately how can i do that? Thanks a lot!
10
by: poison.summer | last post by:
Hi I have a char variable p, I'd like to print the lower 4 bits and higher 4 bits of p seperately, how can I do it? Thanks a lot!
23
by: r.e.s. | last post by:
I have a million-line text file with 100 characters per line, and simply need to determine how many of the lines are distinct. On my PC, this little program just goes to never-never land: def...
8
by: sore eyes | last post by:
Hi I just downloaded the free Watcom compiler and am having a little trouble with File IO http://www.openwatcom.org/index.php/Download I downloaded the following example, commented out the...
2
by: stygian | last post by:
Could someone (anyone) give me a clue how to display all characters stored in a string variable. For example, if I have a text file containing '1\n2\n3\n' I read it in with A=file.read() ...
1
by: gurpreetintown | last post by:
In my project, i have 4 reports on 4 different report viewer controls and i use to print them seperately. Now requirement is of a single button on the main form to print all the reports with a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.