PDA

View Full Version : adding time 15min in a textbox



av8tordude
08-28-2009, 07:21 AM
When I click the enter button on a userform, I would like to add 15 min to the time in a text box that I use in userform.

example:

if I have 12:15 in the textbox and I click enter button on the userform to enter the time at a destination cell, it should add 12:30 to the destination cell.

thank you in advance

Bob Phillips
08-28-2009, 07:46 AM
Worksheets("Sheet1").Range("A2").Value = TimeValue(TextBox1.Value) + TimeSerial(0,15,0)

av8tordude
08-28-2009, 08:08 AM
Sorry for the confusion, but I should have been more clearer. I would like to add 15 mins to the time in the textbox and the new time will be entered to the destination cell.

Bob Phillips
08-28-2009, 09:24 AM
Yeah, that is what I gave you.