+ Reply to Thread
Results 1 to 7 of 7

Linking Texbox in Userform to cell removes formula

  1. #1
    Forum Contributor
    Join Date
    07-02-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    109

    Linking Texbox in Userform to cell removes formula

    Hi all,

    I have a text box TextBox6 which I want to link to cell C18 of worksheet named "Detail". Cell C18 as a formula within it & every time I run the userform it links to the cell once then removes the formula from cell C18. I have various formulas within the workbook & I want the userform to run in real time if you understand? i.e changing a combo box will change the value in C18.

    Thanks,

    Tony.

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Linking Texbox in Userform to cell removes formula

    Hi,

    like this textbox6.xlsm?
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Forum Contributor
    Join Date
    07-02-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Linking Texbox in Userform to cell removes formula

    Hello,

    No I require it to work the opposite way. I have certain a formula in cell C18 & I want the result to show in textbox6 on the userform. It shows once but then when I change the variables on the userform thus changing the value in cell C18 the formula disappears???

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Linking Texbox in Userform to cell removes formula

    Hi,

    could you please upload a sample workbook which contains the userform?

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Linking Texbox in Userform to cell removes formula

    you will have to use code to read the value of the cell into the textbox. if you link them the formula will be wiped out no matter what
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Forum Contributor
    Join Date
    07-02-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Linking Texbox in Userform to cell removes formula

    Quote Originally Posted by tehneXus View Post
    Hi,

    could you please upload a sample workbook which contains the userform?
    Example attached.


    When you change the Size & input a number into the text box called "Pressure" of the userform the values are copied to the sheet "Detail". In cell C18 of the sheet "Detail" there is a multiplication formula which multiplies the values copied from the userform. The result from C18 is then shown on the userform in textbox6 but as soon as you change any values on the userform it deletes the formula in C18. I want to have the userform open & be able to adjust the values while having a result show in the text box named "Torque" of the userform in real time if possible.

    Hope I have explained this better?

    Thanks,

    Tony.
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Linking Texbox in Userform to cell removes formula

    Hi,

    I removed the cell linkage from the text box, this was casing the loss of the formula as the formula result filled the text box with a value, then the value was copied back.
    Also a "live" update is implemented and PIS box can only contain numbers, the combo box cannot be changed by typing in sth
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] showing message box if the result of texbox doesn't match with the range then clear texbox
    By hamidrezaxy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2013, 01:04 PM
  2. Change userform texbox value to number after submitting to wks
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2012, 03:52 PM
  3. Userform Texbox Collection?
    By ions in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2009, 12:54 PM
  4. Textbox 2 Value is formula based on Texbox 1
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2007, 07:20 AM
  5. UserForm TexBox formating
    By pacharbo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2007, 04:44 PM

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