Hello everybody,
I have a worksheet where some data is inserted via a userform. Textbox1, textbox2, textbox4 and textbox5 all have a time (format HH:MM). what I would like to achieve is this: when I click on the commandbutton of the userform the data is inserted in the chosen cells. At this point I would like VBA (and not formulas in the worksheet) to calculate the time according to some criteria. For example:
when pressing the commandbutton:
.Cells(2, 14) = TextBox1.Value (this is what I have now)
.cells (2,13)=(2,14)-0.25/24) .value (this is what I would like to get when I insert the value of textbox1 in cell 2,14)
.cells (2,15)=(2,14)+0.37/24) .value
and so on....
is this achievable via VBA?
I have a worksheet where some data is inserted via a userform. Textbox1, textbox2, textbox4 and textbox5 all have a time (format HH:MM). what I would like to achieve is this: when I click on the commandbutton of the userform the data is inserted in the chosen cells. At this point I would like VBA (and not formulas in the worksheet) to calculate the time according to some criteria. For example:
when pressing the commandbutton:
.Cells(2, 14) = TextBox1.Value (this is what I have now)
.cells (2,13)=(2,14)-0.25/24) .value (this is what I would like to get when I insert the value of textbox1 in cell 2,14)
.cells (2,15)=(2,14)+0.37/24) .value
and so on....
is this achievable via VBA?