borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Change date format...) New Topic New Poll Post Reply
AndreaVB Forum : Database : Need Help
Poster Message
Usman
Level: Trainee

Registered: 28-01-2008
Posts: 1

icon Need Help

basically I have a problem completing a couple of programs for vb and require help from an expert.

For the first program (scenario) - The world’s population reached 6.2 billion people in 2002 and was growing at rate 1.2 percent each year. Assuming that the population will continue to grow at the same rate, write a program to determine when the population will exceed 10 billion.

I have done this program but I need help doing a few things to make it more user friendly.  Irequire the following being done to my program to be done to make it more user friendly, please.  The following is what I have thought of that  I would like done

A mesdsage box to tell them that whjatever figure you want it to caculate it upto it displays the following in the message box   (Eg   The population will exceed 10 billion in 2043)
The rate might not be the same so I might need to change the way that the coding has been done
The user might not want the input of the year to be from the year 2002 and possibly from another year
Use of Errhandler - On Error GoToErrHandler statements to do data validation so that if a user types a letter instead of a number it comes up with a message
The user kight want some sort of input for the population so that the program calculates it upto whatever that figure is

For the second program I require help in doing the coding for the program but I would rather take it one at a time

I have spent a lot of time doing the above but cannot get it to work.  If you cant think of anytghing to make the program more user friendly I would like you to try and code it in the priogram or use other property and please explain to me what you have done.

Thanks



28-01-2008 at 03:44 PM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 978
icon Re: Need Help

Hi

From reading what you need to do and what you want help with, it looks like what you have is a hard-coded formula something like:


Public Function WhatYearWillItBe10Billion()
  Dim yr As Integer
  Dim amt As Double
  Dim rate As Single
  
  yr = 2002
  amt = 6.2
  rate = 1.2 / 100

  Do While amt < 10
    Debug.Print "In " & yr & " it will be " & amt
    
    yr = yr + 1
    amt = amt + (amt * rate)
    
  Loop

  WhatYearWillItBe10Billion = yr

End Function




You say you have spent a lot of time doing the above.
What problems specifically have you had?



____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

28-01-2008 at 07:16 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : Need Help
Next Topic (Change date format...) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder