Consulting

Results 1 to 3 of 3

Thread: Solved: label caption

  1. #1

    Solved: label caption

    Night2.Caption is formated to display numbers in parenthesis (i.e. 1.0). I using the code below to insert this number into a textbox on page0 of a multipage. The code below works as expected, inserting (1.0) in txtNight textbox.

    txtNIGHT.Value = Night2.Caption, "0.0"
    When the number is inserted into the textbox as (1.0), I tried using the code below to take the parenthesis away, but now it displays -1.0.

    txtNIGHT.Value = Format(Night2.Caption, "0.0")
    how can I make it display as 1.0 in the textbox, but keep the Night2.Caption format the same?

    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Maybe

    [vba]

    txtNIGHT.Value = Format(Night2.Caption, "0.0;0.0")
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thank you XLD

Posting Permissions

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