+ Reply to Thread
Results 1 to 4 of 4

Return a formula

  1. #1
    Patrick Simonds
    Guest

    Return a formula

    Is there any way to force this to be a formula when it is placed in cell B3?
    I want someone to be able to enter say 10 + 10 and have the result be 20 in
    cell B3. I know you can enter =10+10 and it will return 20, but I can not
    count on everyone remembering (knowing to use) the = sign.

    Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

    Worksheets("Income").Range("B3").Value = TextBox80.Value

    End Sub



  2. #2
    Gary Keramidas
    Guest

    Re: Return a formula

    i changed it up because i don't have your code, but this worked for me when i
    clicked a commandbutton on the form after entering 10+10 into textbox1

    Private Sub CommandButton1_Click()
    Worksheets("Sheet2").Range("B3").Formula = "=" & UserForm1.TextBox1.Value
    End Sub

    --


    Gary


    "Patrick Simonds" <ordnance1@comcast.net> wrote in message
    news:O0xmYoEuGHA.1296@TK2MSFTNGP02.phx.gbl...
    > Is there any way to force this to be a formula when it is placed in cell B3? I
    > want someone to be able to enter say 10 + 10 and have the result be 20 in cell
    > B3. I know you can enter =10+10 and it will return 20, but I can not count on
    > everyone remembering (knowing to use) the = sign.
    >
    > Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    >
    > Worksheets("Income").Range("B3").Value = TextBox80.Value
    >
    > End Sub
    >




  3. #3
    Patrick Simonds
    Guest

    Re: Return a formula

    Thanks.

    This is how the finished code looked:

    Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value


    "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
    news:%23GrmVtEuGHA.3936@TK2MSFTNGP04.phx.gbl...
    >i changed it up because i don't have your code, but this worked for me when
    >i clicked a commandbutton on the form after entering 10+10 into textbox1
    >
    > Private Sub CommandButton1_Click()
    > Worksheets("Sheet2").Range("B3").Formula = "=" & UserForm1.TextBox1.Value
    > End Sub
    >
    > --
    >
    >
    > Gary
    >
    >
    > "Patrick Simonds" <ordnance1@comcast.net> wrote in message
    > news:O0xmYoEuGHA.1296@TK2MSFTNGP02.phx.gbl...
    >> Is there any way to force this to be a formula when it is placed in cell
    >> B3? I want someone to be able to enter say 10 + 10 and have the result be
    >> 20 in cell B3. I know you can enter =10+10 and it will return 20, but I
    >> can not count on everyone remembering (knowing to use) the = sign.
    >>
    >> Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    >>
    >> Worksheets("Income").Range("B3").Value = TextBox80.Value
    >>
    >> End Sub
    >>

    >
    >




  4. #4
    Gary Keramidas
    Guest

    Re: Return a formula

    glad you got it working.

    --


    Gary


    "Patrick Simonds" <ordnance1@comcast.net> wrote in message
    news:%234LTOyEuGHA.5032@TK2MSFTNGP04.phx.gbl...
    > Thanks.
    >
    > This is how the finished code looked:
    >
    > Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value
    >
    >
    > "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
    > news:%23GrmVtEuGHA.3936@TK2MSFTNGP04.phx.gbl...
    >>i changed it up because i don't have your code, but this worked for me when i
    >>clicked a commandbutton on the form after entering 10+10 into textbox1
    >>
    >> Private Sub CommandButton1_Click()
    >> Worksheets("Sheet2").Range("B3").Formula = "=" & UserForm1.TextBox1.Value
    >> End Sub
    >>
    >> --
    >>
    >>
    >> Gary
    >>
    >>
    >> "Patrick Simonds" <ordnance1@comcast.net> wrote in message
    >> news:O0xmYoEuGHA.1296@TK2MSFTNGP02.phx.gbl...
    >>> Is there any way to force this to be a formula when it is placed in cell B3?
    >>> I want someone to be able to enter say 10 + 10 and have the result be 20 in
    >>> cell B3. I know you can enter =10+10 and it will return 20, but I can not
    >>> count on everyone remembering (knowing to use) the = sign.
    >>>
    >>> Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    >>>
    >>> Worksheets("Income").Range("B3").Value = TextBox80.Value
    >>>
    >>> End Sub
    >>>

    >>
    >>

    >
    >




+ 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