Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
Hello all,
In my user form, I have two comboboxes. "uf1_hr" is a combobox that allows the user to select one of 24 values representing each hour of the day (0-23). The rowsource data is numerical. The second box, "uf1_min" (rowsource is text) allows the user to select 1 of 4 available increments of minutes (00, 15, 30, 45).
Using VBA how am I able to combine the selected values of each combobox to create a time value? I then wish to add the time value to the serial date held as a variable (t_date) in my code, but not sure how to do that in VBA either .
uf1_hr = 14
uf1_min = "00"
result = 14:00
date = 2-Jan-19
t_date = 43467 (1/2/19 12:00:00AM)
new t_date = 43467 + result (1/2/19 2:00:00PM)
Thank you all in advance!
In my user form, I have two comboboxes. "uf1_hr" is a combobox that allows the user to select one of 24 values representing each hour of the day (0-23). The rowsource data is numerical. The second box, "uf1_min" (rowsource is text) allows the user to select 1 of 4 available increments of minutes (00, 15, 30, 45).
Using VBA how am I able to combine the selected values of each combobox to create a time value? I then wish to add the time value to the serial date held as a variable (t_date) in my code, but not sure how to do that in VBA either .
uf1_hr = 14
uf1_min = "00"
result = 14:00
date = 2-Jan-19
t_date = 43467 (1/2/19 12:00:00AM)
new t_date = 43467 + result (1/2/19 2:00:00PM)
Thank you all in advance!
Last edited: