ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code Tweek Needed (https://www.excelbanter.com/excel-programming/278990-code-tweek-needed.html)

Phil Hageman

Code Tweek Needed
 
CANCEL THIS THREAD - SEE NEW THREAD
-----Original Message-----
The cell values in TextBox1 thru 4 show okay, but

TextBox5
thru 8 are blank.

In TextBox4 the sum is 1 - need it to show 100%, and if
not 100%, font: red, bold.

Can someone help me modify this code?

Thanks, Phil

Private Sub CommandButton1_click()
With UserForm2
.TextBox1.Value = Range("B1").Text
.TextBox2.Value = Range("B2").Text
.TextBox3.Value = Range("B3").Text
.TextBox4.Value = Application.Sum(Range("B1:B3"))
.TextBox5.Value = Range("B6").Text
.TextBox6.Value = Range("B7").Text
.TextBox7.Value = Range("B8").Text
.TextBox8.Value = Application.Sum(Range("B6:B8"))
.Show
End With
End Sub

.



All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com