none
How to suppress the decimal point RRS feed

  • Question

  • I have a number that I convert to text and I will suppress the decimal point.

    For exemple:

    Number 85.44  after conversion to text " 85.44" and now I will suppress the decimal point => 8544

    What to do?

    Thanks

    Friday, February 24, 2017 11:11 AM

All replies

  • textvalue = Replace(textvalue, ".", "")
    Friday, February 24, 2017 11:25 AM
  • I realy do not know what you want to get:

    Dim your_value As Double
    your_value = 85.44
    MsgBox "Your value as number: " & your_value
    MsgBox "Your value rounded: " & Round(your_value, 0)
    
    Dim your_string As String
    your_string = CStr(your_value)
    MsgBox "Your value as String: " & your_string


    Oskar Shon, Office System MVP - www.VBATools.pl
    if Helpful; Answer when a problem solved

    Tuesday, February 28, 2017 10:52 AM
    Answerer