Results 1 to 6 of 6

Thread: [RESOLVED] Subtracting from an Integer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    24

    Resolved [RESOLVED] Subtracting from an Integer

    I got a random number generator and it works fine. I click a button and it generates a number between 60 and 100 in a text box. Now i need another number. I need to use the number that was already generated but i want to subtract 40 from it to get my second number so that it can out put it in another text box. Is there a simple way to do this?
    Last edited by helio2; Aug 12th, 2007 at 08:34 PM.

  2. #2
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Subtracting from an Integer

    this is in office right? Which office program? You can embed formulas inside textboxes in access.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    24

    Re: Subtracting from an Integer

    I'm not really using any Office XP programs. I'm just using Visual Basic 2005.

    Is there a way i can do it with Just Visual Basic?

  4. #4
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Subtracting from an Integer

    yes but you posted it in the office development forum.
    textbox2.text = str(val(textbox1.text) - 40)
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    24

    Re: Subtracting from an Integer

    Oh, i thought this was anything to do with business stuff. Sorry and thanks.

  6. #6
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: [RESOLVED] Subtracting from an Integer

    not exactly. this particular issue should have been posted in the vb.net forum since that's the program you use. Office development forum is more along the lines of programming using the macro language and vba inside office programs.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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