M Mike H Dec 13, 2008 #2 Hi, Put your textbox from the Control toolbox on your worksheet, you then have choices. 1. While still in design mose right click the textbox and view code and paste this in Private Sub TextBox1_GotFocus() TextBox1.Text = WorksheetFunction.Sum(Range("A1:a10")) End Sub Exit design mode and when the textbox is selected the sum is displayed. or. 2. Exit desing mode and right click the sheet tab, view code and paste this in Private Sub Worksheet_Change(ByVal Target As Range) TextBox1.Text = WorksheetFunction.Sum(Range("A1:a10")) End Sub The text box now does the sum whenever the worksheet changes. Mike
Hi, Put your textbox from the Control toolbox on your worksheet, you then have choices. 1. While still in design mose right click the textbox and view code and paste this in Private Sub TextBox1_GotFocus() TextBox1.Text = WorksheetFunction.Sum(Range("A1:a10")) End Sub Exit design mode and when the textbox is selected the sum is displayed. or. 2. Exit desing mode and right click the sheet tab, view code and paste this in Private Sub Worksheet_Change(ByVal Target As Range) TextBox1.Text = WorksheetFunction.Sum(Range("A1:a10")) End Sub The text box now does the sum whenever the worksheet changes. Mike
G Gord Dibben Dec 13, 2008 #4 Link the textbox to a cell in which you have a SUM formula? Gord Dibben MS Excel MVP