Returning number and place in textbox
Returning number and place in textbox
(OP)
Please can someone tell me, I have a formula in cell d23 and the answer I would like to display in my textbox, but when I try to display it, the formula disappears or excel crashes. If I use the source option under properties, it does not seem to work with a formula. I wish to subtract two other cells which is sources of two other textboxes.
RE: Returning number and place in textbox
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Returning number and place in textbox
Private Sub txtironmass_Change()
Dim x As range
Set x = Worksheets("program").range("d23")
x.Select
ActiveCell.Formula = "=z-y"
End Sub
This is another piece of code I have tried.
Private Sub txtironmass_Change()
Dim myrange1 As range
Set myrange1 = Worksheets("program").range("d23")
If Cells("d22") > 0 Then
myrange1("D23").Select
ActiveCell.FormulaR1C1 = "=R[-1]C-R[-2]C"
Else: range("d23").Select = 0
End If
End Sub
Would this be more helpful
RE: Returning number and place in textbox
-handleman, CSWP (The new, easy test)
RE: Returning number and place in textbox
Display cell contents in a shape or text box
============================================
Click the AutoShape or text box you want to link.
In the formula bar, type an equal sign (=).
Click the worksheet cell that contains the data or text you want to link to.
You can also type the reference to the worksheet cell. Include the sheet name, followed by an exclamation point, for example:
Sheet1!F2
Press ENTER.
Note You cannot use this procedure in a freeform, scribble, line, or connector.