Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Problems to be solved by visual basic..Pls.Help me

simpleprettymesimpleprettyme Member Posts: 2
im just new in this field,im still studying as computer programmer in a Tesda school here in our town..

here's the problem,,i hope you can help me solve this tonight..

A car travelled 10 minutes in gravel,15 minutes in sand, 20 minutes in asphalt, 25 minutes in mud..
How can i run this,,that when i type for example 27 minutes so the car will be on the asphalt,,when i type the number of minute the corresponding place will appear in the textbox..

pls help me..pls..

**sumtimes we need to break the rules and follow apart,***


  • MrWhiskersMrWhiskers Member Posts: 5
    im sorry im not following what you are asking.

    please explain a lil better.
  • D3D3 Member Posts: 5
    If I were you, I would use and If, Then, Else Statement, or a Case Select statement. I'm not sure what the coding would be on your version of VB, but on mine the if/then/else is this

    dim minutes as integer

    if minutes < 10 and > 0 then"gravel")
    ElseIf minutes > 10 and < 25 then"sand")

    and so forth until

    ElseIf minutes > 70 then"insert some message")

    You can also use just Else for the last one

    Where I put a message box, you put whatever code the instructor wants

    You can also use a case selection structure, but I don't recall that one quite as well.
Sign In or Register to comment.