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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved Visual Basic
3 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.
  • H Offline
    H Offline
    hkjghkj1
    wrote on last edited by
    #1

    [Message Deleted]

    A L 2 Replies Last reply
    0
    • H hkjghkj1

      [Message Deleted]

      A Offline
      A Offline
      alx n
      wrote on last edited by
      #2

      Try this: n = TextBox1.Text If IsNumeric(n) then Dim sTemp as string = n.Substring(0,1) TextBox1.Text = n End If

      alex_nel

      1 Reply Last reply
      0
      • H hkjghkj1

        [Message Deleted]

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        myventsi wrote:

        Why it' s not working?

        Because your code is utterly wrong. The last iteration of your while loop will result in n being zero, since that is what makes the while-test fail; now when n is such that n/10 is zero, then for sure n\10 is also zero. What you need is a modulus operator, and fortunately your language has one. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


        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