+ Reply to Thread
Results 1 to 9 of 9

TextBox in UserForm to show cell value instantly

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: TextBox in UserForm to show cell value instantly

    I thought if I did that then if anyone types anything in the third TextBox it would overwrite the formulas in the linked cell?

    Thanks Sandy

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: TextBox in UserForm to show cell value instantly

    true though if the purpose of the txbox is to display results could you not set the enabales to false

    actially you can not set the enabled to false else the data will not update
    try setfocus
    Private Sub txbox_Enter()
    TextBox1.SetFocus
    End Sub
    Last edited by D_Rennie; 11-03-2009 at 06:25 PM.


  3. #3
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: TextBox in UserForm to show cell value instantly

    Did that, and whether enabled is set to true or false, the formula in the cell is overwritten when I start entering values in the first two TextBoxes (there are no links in theses two TextBoxes)??

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: TextBox in UserForm to show cell value instantly

    Hello Gsandy,

    The attached file should help. It uses three text boxes to sum 2 values and display the results in the third. All values are shown in cells "A1:C1".
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: TextBox in UserForm to show cell value instantly

    Hi Leith,

    The problem with your solution is that you have the calculation within "ShowSum". The answer showing in my cell B11 comes from quite complex spreadsheet calculations and I dont think I can do this within VBA.

    Is my best solution to have a "Calculate" command button that refreshes the form to show B11's cell value?

    Thanks Sandy

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: TextBox in UserForm to show cell value instantly

    Hello Gsandy,

    The button might be the way to go. With so little information about the layout, data, formulas, and VBA code, I can't give you an definitive answer.

  7. #7
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: TextBox in UserForm to show cell value instantly

    Thanks for trying leith. Sandy

+ 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