View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Phil Hageman Phil Hageman is offline
external usenet poster
 
Posts: 80
Default Summing Cells and Formatting

1.) How do I change the TextBox21 line of code to make it
sum the cells A4, A9, E4, AND E9?

Private Sub CommandButton1_click()
With UserForm2
.TextBox21.Value = Application.Sum(Cells
("A4", "A9", "E4", "E9"))
.Show
End With
End Sub

2.) For TextBox21, what would the code be to:
a. make the value percentage, and
b. make the font bold/red when the value is not 100%?

Thanks, Phil