View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Calculating Textboxes

Then, instead of a variable named Answer, you would assign the same thing I
showed to the Value property of Textbox60...

With WorksheetFunction
Textbox60.Value = 24 * (.Max(Textbox21.Value, TextBox31.Value, _
Textbox41.Value) - .Min(Textbox22.Value, _
TextBox32.Value, Textbox42.Value))
End With

and, as for this code, you would put it in the Change event for Textbox50
(this presumes you are either using an ActiveX TextBox on a worksheet or
your TextBox is located on a UserForm).

--
Rick (MVP - Excel)


"ordnance1" wrote in message
...
I should refine my question more.

I want this calculation to take place when I make a change to Textbox50
and I want the resulting value to be placed in Textbox60

"Rick Rothstein" wrote in message
...
Something like his should work...

With WorksheetFunction
Answer = 24 * (.Max(Textbox21.Value, TextBox31.Value, Textbox41.Value) _
- .Min(Textbox22.Value, TextBox32.Value, Textbox42.Value))
End With


--
Rick (MVP - Excel)


"ordnance1" wrote in message
...
I need something that will find the Max value found in Textbox21,
TextBox31, Textbox41 then multiply that number by 24 then subtracted the
Min value of Textbox22, TextBox32, Textbox42 multiplied by 24.

Ant textbox that is blank should be ignored.