Results 1 to 7 of 7

Thread: TextBox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2008
    Posts
    198

    TextBox

    hi.
    anyone have an idea how to get the last # of degit the textbox
    i mean:
    if i have n the textbox the string. "c:\mysite\index.htm"
    if i gev the #3 i wanna get "htm"
    if i gev the #6 i wanna get "ex.htm"
    anyone can help me?

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: TextBox

    Code:
    Private Sub Command1_Click()
    Dim num As String
    num = CInt(InputBox("Enter the length!!", "Length"))
    MsgBox Right(Text1.Text, num)
    End Sub
    Will this help you...???

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3
    Hyperactive Member
    Join Date
    Jan 2006
    Location
    Pakistan
    Posts
    388

    Re: TextBox

    Or if you want to use a function, then simply use this code (a variation of the code above)

    Code:
    Private Function GetLastBytes(ByRef Src As TextBox, ByRef ln As Integer) As String
       GetLastBytes = Right(Src.Text,ln)
    End Function

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2008
    Posts
    198

    Re: TextBox

    thanks work's will

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: TextBox

    If ur problem is solved, then mark the thread as resolved

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Apr 2008
    Posts
    198

    Re: TextBox

    how i mark the theard?

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: TextBox

    Click on "Thread tools" just above the first post in this thread, then "Mark thread resolved".

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