Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Software Development
Tag Cloud
access acer asus batch bios bsod crash desktop driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop malware memory modem monitor motherboard mouse network printer problem ram registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Software Development >
Solved: Do Loop not working in VB Express 2008

Reply  
Thread Tools
trooper01's Avatar
Computer Specs
Junior Member with 14 posts.
 
Join Date: Jun 2008
Experience: Intermediate
24-Nov-2008, 07:29 PM #1
Solved: Do Loop not working in VB Express 2008
I'm a very beginner at programming. I'm trying to finish an assignment in VB Express 2008 and I desperately need help with part of it.

I'm trying to create a list box that reads data from a text file and places the records in a list box.

My text file has 17 records, and I can only have 3 records per page. I also need page numbers.

Page 1 prints fine, but all other pages print only the heading and 1 record. I cannot get my page counter to work either.

Something is wrong with my Do Loop, but I don't know what.

I've attached a file showing my code.

Can anyone tell me what I'm doing wrong?
Attached Files
File Type: txt ListBoxCode.txt (3.4 KB, 94 views)
pvc_'s Avatar
Computer Specs
Member with 456 posts.
 
Join Date: Feb 2008
Location: Tampa, FL
Experience: Computer Scientist
25-Nov-2008, 07:21 PM #2
I didn't follow your entire code, but I saw two things that needed correction. First of all, you shouldn't use "Nothing" for string, use vbnullstring. Also, try to add the following line to the if statement in your loop and run the code to see what happens:

else msgbox "L"
DoubleHelix's Avatar
Trusted Advisor with 21,050 posts.
 
Join Date: Dec 2004
Experience: A little of this...a litt
25-Nov-2008, 09:04 PM #3
Step through the code one line at a time and watch your variables. You're missing some key components. This should become apparent if you watch your variables update in real time.
trooper01's Avatar
Computer Specs
Junior Member with 14 posts.
 
Join Date: Jun 2008
Experience: Intermediate
27-Nov-2008, 01:59 PM #4
Thanks for the help guys! I've got my problem solved.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:36 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.