PDA

View Full Version : Solved: Trying to have text box in user form display cell contents



Whitty
08-07-2007, 10:48 PM
I have a fairly extensive user form that will gather data from a user then display a lot of analysis of that data. So a majority of the text boxes will simply display the results of formulas run in the worksheet based on the data that is inputted. I learned how to link a text box to the cell using ControlSource, but that did not solve my problem.

The problem is that when I put a formula into the cell linked to a text box in the user form, the formula runs right after I input it (like it normally would) but then the formula is overwritten with the results. So I can not pre-program all of the formulas and then run the form as all of the formulas are gone.

I'm at a loss. Please help! :help

JimmyTheHand
08-07-2007, 11:07 PM
If you have the worksheet protected, the formula will remain even after the userform was displayed. And the formula works with protected sheet, too.
In order to be able to enter data manually into some cells in the sheet, you need to unlock those cells before protecting the sheet.
It might make sense to unlock all cells, then lock only those that contain formulas linked to textboxes.

Jimmy

Whitty
08-07-2007, 11:36 PM
Well, that sure was a nice simple fix. I'll just have to make sure all my formulas are complete and working properly before I lock the sheet and then link them to the user form. Thanks Jimmy!
:beerchug:

JimmyTheHand
08-07-2007, 11:44 PM
You are welcome :yes
Now, if it's over, you might consider marking the thread "Solved". To do this, use the Thread Tools above the first post.

Jimmy