![]() |
time userform 12:00 changes in 00:05
Hello,
I have the following problem. In a userform i have a textbox with contain a time value. if i fill in the time value 12:00 and save the time the time i correct given in the excel sheets. After loading the form again i get 00:05 for 12:00. if i change the time to 12:01, the time value is correct. Even with 13:00 of 14:00 but not 12:00. I use the following code: TextBox6.Value = b6 TextBox6.Value = Format(Me.TextBox6.Value, "h:mm") B6 is the cell value can anyone help me THanks |
time userform 12:00 changes in 00:05
try adding a second h to the hour. also add date value. A text box is text
data, not a Serial Date (microsoft date format). from TextBox6.Value = Format(Me.TextBox6.Value, "h:mm") to TextBox6.Value = Format(datevalue(Me.TextBox6.Value), "hh:mm") "joost" wrote: Hello, I have the following problem. In a userform i have a textbox with contain a time value. if i fill in the time value 12:00 and save the time the time i correct given in the excel sheets. After loading the form again i get 00:05 for 12:00. if i change the time to 12:01, the time value is correct. Even with 13:00 of 14:00 but not 12:00. I use the following code: TextBox6.Value = b6 TextBox6.Value = Format(Me.TextBox6.Value, "h:mm") B6 is the cell value can anyone help me THanks |
All times are GMT +1. The time now is 07:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com