Results 1 to 4 of 4

Thread: Formula Editor/Bar in UserForm TextBox?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Feb 2017
    Posts
    8
    Rep Power
    0
    .
    .
    Paste this code in your UserForm for the CommandButton.

    Code:
    Option Explicit
    
    Private Sub CommandButton1_Click()
        Sheets("Sheet1").Range("A3").Formula = TextBox1.Text
    End Sub
    This example presumes two numbers, one in A1 and one in A2 ..... with the total in A3.

    ex: =SUM(A1:A2)

    or

    ex: =A1-A2

    or

    ex: =A1*A2
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0
    Quote Originally Posted by Logit View Post
    .
    .
    Paste this code in your UserForm for the CommandButton.

    Code:
    Option Explicit
    
    Private Sub CommandButton1_Click()
        Sheets("Sheet1").Range("A3").Formula = TextBox1.Text
    End Sub
    This example presumes two numbers, one in A1 and one in A2 ..... with the total in A3.

    ex: =SUM(A1:A2)

    or

    ex: =A1-A2

    or

    ex: =A1*A2
    You'd have to type in the formula and cell references for this method. Is it possible to add a formula bar to the UserForm -- so that you can click a cell?

Similar Threads

  1. Editor Formating Test
    By DocAElstein in forum Test Area
    Replies: 10
    Last Post: 09-10-2025, 02:20 PM
  2. Replies: 8
    Last Post: 08-17-2016, 12:23 PM
  3. Replies: 10
    Last Post: 10-17-2013, 07:36 PM
  4. VBA editor auto-deletes spaces at the ends of lines
    By LalitPandey87 in forum Excel Help
    Replies: 0
    Last Post: 06-26-2012, 07:53 PM
  5. Hide Ribbon and Formula Bar
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 04-21-2011, 07:03 PM

Posting Permissions

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