View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
richard richard is offline
external usenet poster
 
Posts: 24
Default Userform updating

I have a userform with many controls on it (dropdown and
checkboxes).

I then have a total field on my first sheet which depends
on options ticked.
I have a text box which holds the running total, and is
updated by the following code attached to a command button:

Private Sub CommandButton10_Click()
Sheets("Summary").Select
Selection.AutoFilter Field:=3, Criteria1:="<"
Sheets("Cost Analysis - Overall").Select
Range("A2").Select
Selection.AutoFilter Field:=2, Criteria1:="<"
Range("Summary!d38").Copy
Sheets("summary").Select
Range("D50").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Sheets("summary").Calculate
TextBox45.Text = Sheets("summary").Range("D50").Value
Range("a1").Select
End Sub

Is there a way i can get the update to occur every time
any of the controls are clicked, without having to out
code against every control?

Thanks in advance

Richard