View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Running Total on Userform

Link your textbox to a worksheet cell such as B2. Then use the worksheet
calculate event to update that cell with the running total from the cell
where the running total is calculated (in this example, B1). This will
avoid the linking of the textbox overwriting your formula:

Private Sub Worksheet_Calculate()
On Error goto ErrHandler
Application.EnableEvents = False
Range("B2").Value = Range("B1").Value
ErrHandler:
Application.EnableEvents = True
End Sub

--
Regards,
Tom Ogilvy


"Richard" wrote in message
...
I have a useform, which has many options on it. Each
option selected affects the costs of the project
concerned. This is all taken care of on the worksheets
behind.
What i would like however is to have a box which contains
the running total, so a user could click an option or a
supplier, thn change it to see instantly the difference in
costs.

This value already exists on the worksheet, buti am unable
to keep it 'live' on the userform.

Any ideas?
Thanks
Richard