Results 1 to 9 of 9

Thread: Urgent Help (easy but i am a newbie)

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2014
    Posts
    1

    Urgent Help (easy but i am a newbie)

    Hello! New here,need some help for vb 6.0
    Q-1 Input the marks obtainted by student in three subjects and calculate the total,percentage and average of the sutudent.Max marks are 40. (sounds silly but yea treat me as naive in programing )

    that's it i suppose

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Urgent Help (easy but i am a newbie)

    You should investigate about:
    -How to Declare Numeric variables in VB6
    -How to accept data from the user in VB6
    -How to use arrays in VB6
    -How to calculate percentages and averages in VB6

    Then write some code and test it... and if you have problems then post in the forum and maybe someone would want to help you
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Urgent Help (easy but i am a newbie)

    Sounds like homework. If so, are you sure this is VB6 or is it .Net?
    Wasn't sure modern-day classes still taught VB6
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Urgent Help (easy but i am a newbie)

    Geez, I almost want to find the guy a copy of GWBASIC or BASICA. Muhammadali233, if you're truly that much of a beginner, but have the VB6 development environment installed, just start with the default project. Double-click the default form and do all your work in the form_load event. If you're willing to just stay in the development environment, use the Debug (Immediate) window (opened with CTRL-G) and just write your output to that window (with Debug.Print ...).

    Also, delete any Option Explicit at the top of your form's code. That way, you don't have to worry about declaring your variables. (Although, later on, you will want to learn about that.)

    Then, in the form_load event, you can just do something like:

    a = 25
    b = 28
    c = 35
    avg = (a + b + c) / 3
    debug.print avg


    (The a, b, c, & avg variables will be something called variants, but don't worry about it.)
    From there, you REALLY should pick up some BASIC for DUMMYs book and learn it on your own.

    Regards,
    Elroy

  5. #5
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    759

    Re: Urgent Help (easy but i am a newbie)

    We won't write homework assignments for you.

    We will give you a few pointers to help you do it yourself. (Not that sort of "Pointer"; not yet a whiles, anyway )

    (1) "Urgent"? Don't leave it so late. We're mostly unpaid volunteers around here who only look in if we get an idle moment or two in our day jobs. This is a Forum; not Faceplant or Twaddle.
    (2) Getting input from the User? I'd go with TextBoxes. Forget about InputBox(); you'll use it maybe two or three times, realise just how rubbish it is and write your own input dialogs forevermore.
    (3) TextBoxes work with Strings. You want to do arithmetic, so you'll need to do some Data Type conversions. Do those conversions yourself, with code; that way you know exactly what's going on.
    (4) VB arithmetic can be "interesting". If VB can get away with using Integers for everything then it will, which will make those averages and percentages (which need fractional bits) a bit "lacking".
    (5) Giving the result(s) back to the User. Labels are one way, but you can't cut-n-paste out of Labels, so I'd suggest [yet] more TextBoxes.

    Regards, Phill W.

  6. #6
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Urgent Help (easy but i am a newbie)

    This is a Forum; not Faceplant or Twaddle.
    LOVE IT!!!!!

    OP-Your plea for "Urgent Help" requires a bit more urgency on your part...it's been 18+ hours and we have not heard back from you....also, tend to believe what Lavolpe twittere....I mean, commented....you sure this is VB6 and not one of the VB.NET software products you are using?

  7. #7
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Urgent Help (easy but i am a newbie)

    The OP clearly posted
    Hello! New here,need some help for vb 6.0
    Believe it or not, but in many places around the world they are still teaching VB6 and DAO in XP boxes
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  8. #8
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Urgent Help (easy but i am a newbie)

    Cool beans, as the young'un's say. *smiles*

  9. #9
    Addicted Member
    Join Date
    Jul 2014
    Posts
    176

    Re: Urgent Help (easy but i am a newbie)

    To the O.P

    yes, you are naive, but how will you learn if you don't try...

    How did I know that?

    You said the magic word, "easy"...

    You know it's easy...
    If I had helped you...

    Don't forget to mark your Inquiry as RESOLVED...

    I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...

    Happy VB Coding Everyone!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width