-2

I want to add Time value in excel vba.

Label1.caption= TextBox1.Value + TimeValue("14:30:00")

where i will give the timevalue to textbox1 and click the submit button,

The label1 must show the added time value of textbox1 and timevalue("14:30:00").

I want this code because I want to change the given IST time to EST time.

Please help me...

4

1 回答 1

0

Try this.

TextBoxTime = TimeValue(TextBox1.Value)
TimetoAdd = TimeValue("14:30:00")
AddedTime = TextBoxTime  + TimetoAdd
Label1.Caption = Format(AddedTime, "hh:mm:ss")
于 2013-08-11T03:19:39.320 回答