Results 1 to 8 of 8

Thread: [RESOLVED] Question Please!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    138

    Resolved [RESOLVED] Question Please!

    I have Text Box Control called txtCount
    VB Code:
    1. txtCount.Text = "Users Count " & X & " Now"
    it could be something like this
    "Users Count 56 Now" or "Users Count 3 Now" ...etc

    How can I make a short code that takes the Value X between "Users Count " & " Now".

    Thanks
    Last edited by Hack; Jul 27th, 2006 at 07:47 AM. Reason: Added [RESOLVED] to thread title and green "resolved" checkmark

  2. #2
    Lively Member
    Join Date
    Jul 2006
    Posts
    110

    Re: Question Please!

    Hi ASoufan, once again i'd love to help but i don't really know what you want to do? Do you want a piece of code to give X a value?

  3. #3
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: Question Please!

    could you elaborate more on what you want to do.
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Question Please!

    do you want to find out the value of x from the text box, after assigning the text to it...why dont you call the x if you have a variable...or use mid function
    VB Code:
    1. MsgBox Val(Mid(txtCount.Text,13))
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  5. #5
    Lively Member
    Join Date
    Jul 2006
    Posts
    110

    Re: Question Please!

    ahhh, now i understand, you want to isolate the X value from the string located in txtCount. use one of ganeshmoorthy's methods.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    138

    Re: Question Please!

    Thanks guys, I got the function that get a part of text from full text
    VB Code:
    1. Function GetTXT(FullTXT As String, StartTXT As String, EndTXT As String) As String
    2.     GetTXT = Mid(FullTXT, InStr(1, FullTXT, StartTXT) + Len(StartTXT), InStr(1, FullTXT, EndTXT) - InStr(1, FullTXT, StartTXT) - Len(StartTXT))
    3. End Function

    It will be like this
    VB Code:
    1. MsgBox GetTXT("Users Count 56 Now","Users Count "," Now"
    This will apear 56 or any string a message Box.

    *RESOLVED*

    Thanks!

  7. #7
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Question Please!

    you are most welcome
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Question Please!

    Quote Originally Posted by ASoufan
    Thanks guys, I got the function that get a part of text from full text

    *RESOLVED*

    Thanks!
    If you consider this resolved, would you please pull down the Thread Tools menu and click the Mark Thread Resolved menu item? That will let everyone know that you have your answer.

    Thank you.

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