+ Reply to Thread
Results 1 to 4 of 4

Textbox and label formulas-continue

  1. #1
    damorrison
    Guest

    Textbox and label formulas-continue

    In a userform I would like to have Label17 caption that shows the
    value of a formula something like:
    If ListBox2= H.W.R. THEN TextBox4 - .125 else TextBox4 + .125

    How can this be done???


  2. #2
    Chip Pearson
    Guest

    Re: Textbox and label formulas-continue

    I'm not entirely clear about your question, but try something
    like

    If ListBox2.Value = "H W R" Then
    TextBox4.Text = "-.125"
    Else
    TextBox4.Text = "+.125"
    End If


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "damorrison" <[email protected]> wrote in message
    news:[email protected]...
    > In a userform I would like to have Label17 caption that shows
    > the
    > value of a formula something like:
    > If ListBox2= H.W.R. THEN TextBox4 - .125 else TextBox4 + .125
    >
    > How can this be done???
    >




  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483
    Private Sub ListBox2_Change()
    If ListBox2.Value = "H.W.R." Then
    Label17.Caption = TextBox4.Text - 0.125
    Else
    Label17.Caption = TextBox4.Text + 0.125
    End If

    End Sub

  4. #4
    damorrison
    Guest

    Re: Textbox and label formulas-continue

    Thanks Guys ,
    This is working great!


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1