2 Replies - 514 Views - Last Post: 10 February 2013 - 11:42 AM Rate Topic: -----

#1 Rawnney  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-February 13

"Constant value button"

Posted 06 February 2013 - 08:24 AM

Hello! I'm trying to make a simple program using VB8. I'm trying to make a button which will multiple the input from a textbox, with the constant value of 1,8 (X*1,8). And then I'm trying to make the answer stay in the memory as It might has to be multiplied again. I'm totally lost and would really appriciate any kind of help.

f.ex. 1000*1,8=1800 -> 1800*1,8=3240

Thank you in advance,
Rawnney
Is This A Good Question/Topic? 0
  • +

Replies To: "Constant value button"

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5540
  • View blog
  • Posts: 11,868
  • Joined: 02-June 10

Re: "Constant value button"

Posted 06 February 2013 - 08:39 AM

VB8 ?? Do you mean outdated VB6 or do you mean VB.NET?

First off - textboxes don't hold number, they hold text. So you need to convert the text to a numeric type link int or decimal.

Then you need to make your button handler method.

So... have you read anything on VB? Done any tutorials, worked through a "Learn VB in 30 days" kinda book? Because you need to learn the language before you can write the program.

VB8 ?? Do you mean outdated VB6 or do you mean VB.NET?

First off - textboxes don't hold number, they hold text. So you need to convert the text to a numeric type link int or decimal.

Then you need to make your button handler method.

So... have you read anything on VB? Done any tutorials, worked through a "Learn VB in 30 days" kinda book? Because you need to learn the language before you can write the program.
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: "Constant value button"

Posted 10 February 2013 - 11:42 AM

Rawnney, "I'm trying to make the answer stay in the memory as It might has to be multiplied again" suggests that you don't understand even the most basic concept of computer programming, the storing of a variable. I would suggest that you buy and read a book such as "Absolute Beginner's Guide to Programming" and get started. You'll find that your understanding of algebra allows you to cover this ground rapidly, but you do need to cover it.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1