Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: Convert Percent Textbox Into A Calculated No.

  1. #1
    Join Date
    29th June 2004
    Posts
    98

    Convert Percent Textbox Into A Calculated No.

    Hi There
    I Have A Textbox contains a Percent No(eg: 1.00%) Whenever A calculation Is To be Done Software Does Not Recognize The Percent Number. I tried All Possible Ways To Convert Like Clng,Cdbl,Csng, Format Textbox No Use

    Any Way I Could Find help here n The Forum?????/



    Thanks In advance

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    7th February 2003
    Location
    Kewarra Beach, Cairns - TNQ
    Posts
    1,055
    wkalo,

    You need to strip away the % sign and convert the result to a number:

    eg
    Sub myResult()


    Dim i As Integer, x As Integer, y As String

    'y is value entered in the textbox ie. 1.00%
    y = TextBox1.Value

    'i is the everything left of the % sign, decalred above as an integer
    i = Left(y, Len(y) - 1)

    x = TextBox2.Value

    msgbox i + x


    End Sub

    Hope that helps
    Weasel
    Kind Regards
    Pesky Weasel
    "I have a plan so cunning, you could put a tail on it and call it a Weasel." EB
    Eagles may soar, but Weasels don't get sucked into jet engines.
    Templates and Calculators
    The Way of the Weasel
    Download Ivan & Colo's HTML Maker Here
    101 Excel Hacks - Great New Book
    Huge Savings on Excel Training

  3. #3
    Join Date
    29th June 2004
    Posts
    98
    Thank You Very Much Problem Is Solved !!!!

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 9
    Last Post: December 17th, 2007, 23:03
  2. Convert Textbox To Date Type
    By lche90 in forum EXCEL HELP
    Replies: 8
    Last Post: May 10th, 2007, 00:42
  3. Convert Text Entered In Textbox
    By tochybaja in forum EXCEL HELP
    Replies: 4
    Last Post: March 22nd, 2007, 03:46
  4. Convert Textbox Currency to Number
    By DrewBe in forum EXCEL HELP
    Replies: 3
    Last Post: November 24th, 2006, 14:30
  5. convert from textbox to combobox/listbox
    By mike015 in forum EXCEL HELP
    Replies: 7
    Last Post: August 10th, 2005, 03:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno