dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: vb probs needs help

  1. #1
    Join Date
    Feb 2007
    Posts
    3

    vb probs needs help

    hi to everyone
    take 1 command button,and two text box.
    In text box 1 we enter 8 digit no. when we press command button then the 8 digit no. in text box1 will appear on text box2 with only 7 digits(the last digit i want will not appear)
    I m new to VB ,please help

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Take a look at the Left function in VB's online help.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    digits mean numbers ?

    try this:
    Code:
    sub command_click()
    text2 = fix(val(text1)/10)
    end sub
    of course the left() function is useful too but this previous one to remove last number from any unknow length number.
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  4. #4
    Join Date
    Mar 2007
    Posts
    3
    Quote Originally Posted by amit.nikhil
    hi to everyone
    take 1 command button,and two text box.
    In text box 1 we enter 8 digit no. when we press command button then the 8 digit no. in text box1 will appear on text box2 with only 7 digits(the last digit i want will not appear)
    I m new to VB ,please help
    text2.text = mid$(text1.text,1,7)

Similar Threads

  1. VB as a career choice?
    By steve in forum Careers
    Replies: 8
    Last Post: 08-08-2008, 09:46 AM
  2. Told you so.... C# replacing VB
    By Bob in forum .NET
    Replies: 44
    Last Post: 06-06-2008, 04:39 AM
  3. re: moving from VB to C# -- more reasons
    By Jeff Johnson in forum .NET
    Replies: 6
    Last Post: 01-18-2007, 08:44 AM
  4. .NET vs. Enterprise Java: Who's Got Better Security?
    By Glen Kunene in forum Talk to the Editors
    Replies: 17
    Last Post: 03-23-2002, 01:43 AM
  5. VB 6 does not get error from RAISERROR in SQL stored procdure
    By Allison Boughton in forum VB Classic
    Replies: 6
    Last Post: 03-05-2001, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center