Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Divide

Divide

Scheduled Pinned Locked Moved Visual Basic
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amarni
    wrote on last edited by
    #1

    How i can devide two number in the same text field and return the result the operation is 30/20 this is in the textbox1 then i need the result 1.5 Amarni

    D J 2 Replies Last reply
    0
    • A Amarni

      How i can devide two number in the same text field and return the result the operation is 30/20 this is in the textbox1 then i need the result 1.5 Amarni

      D Offline
      D Offline
      Dave Sexton
      wrote on last edited by
      #2

      you'll have to split the string first using some form of delimiter (an operator perhaps), parse them, perform the calculation and then return the result.

      A 1 Reply Last reply
      0
      • D Dave Sexton

        you'll have to split the string first using some form of delimiter (an operator perhaps), parse them, perform the calculation and then return the result.

        A Offline
        A Offline
        Amarni
        wrote on last edited by
        #3

        i know that.. but how could i use this way ?????? and id the user make an error like this 30//10 or 30/10/ so what is the solution for this problem Amarni

        1 Reply Last reply
        0
        • A Amarni

          How i can devide two number in the same text field and return the result the operation is 30/20 this is in the textbox1 then i need the result 1.5 Amarni

          J Offline
          J Offline
          jo_eylee
          wrote on last edited by
          #4

          Try to split the text then call divide function. Dim num() As String = txtInput.Text.Split(CChar(vbTab)) '//Throw number to function Divide(num(0), num(1)) Hope this help. :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups