Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello to eveybody,
How may I calculate a difference btwn [TextBox2]-[TextBox3] in a UserForm, show the result in [TextBox5] and insert the result in the appropriate cell D of the PaperReceipt worksheet when I click on a button? The [TextBox3] initially has the same value has [TextBox2] but in the TextBox I need sometime to change the number. Thanks in advance. Regards John In the UserForm there is a combo and the code behind is: Private Sub mSearch(ByVal vValore As Variant) Dim rng As Range With sh 'search value column D Set rng = _ .Range("D:D").Find( _ What:=vValore, _ LookIn:=xlValues, _ LookAt:=xlWhole, _ SearchOrder:=xlRows, _ SearchDirection:=xlNext, _ MatchCase:=True) End With 'chek result If rng Is Nothing Then 'if no MsgBox "Data nof found" 'clean TextBox Call mClear TextBox Else Me.TextBox2.Text = rng.Offset(0, 3).Value Me.TextBox3.Text = rng.Offset(0, 3).Value Me.TextBox4.Text = rng.Offset(0, 2).Value End If Set rng = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time difference btwn entries | Excel Worksheet Functions | |||
Calculate Textbox value based on another textbox value.doc | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value | Excel Discussion (Misc queries) | |||
CALCULATE DIFFERENCE BETWEEN 2 TIMES - RESULT IN MINUTES | Excel Discussion (Misc queries) | |||
formatt to Calculate difference in now() and date in cell, | Excel Discussion (Misc queries) |