my application/code:
Via a userform, the user enters data into several fields, one of which is a text box for a DATE to be entered.
When the user closes the form, the data from the form is posted over to the main worksheet.
here is my code for posting (and formatting) the date field from the form to the worksheet:
So over on the worksheet, in the specific cell listed above, it now looks like this:
Also when the data from the userform is moved over to the worksheet, another cell has whatever the current TIME happens to be placed into it (and formatted as shown):
the code for this:
So out on the worksheet, and in the specific cell listed above, it looks like this:
here's my problem and my request:
I need to have the two cells listed above combined. The result of combining those 2 cells (the DATE cell in -> (10, lCol + 2), and the TIME cell in -> (3, lCol + 2) ) needs to look like the example shown below and placed into: (6, lCol + 1) .
The resulting cell in (6, lCol + 1) after being combined and formatted correctly needs to look like THIS:
Thank you in advance for the solution, or suggestions.
Via a userform, the user enters data into several fields, one of which is a text box for a DATE to be entered.
When the user closes the form, the data from the form is posted over to the main worksheet.
here is my code for posting (and formatting) the date field from the form to the worksheet:
Code:
.Cells(10, lCol + 2).Value = Me.txtDateBox.Value
.Cells(10, lCol + 2).NumberFormat = "MM'/'dd'/'yyyy"
So over on the worksheet, in the specific cell listed above, it now looks like this:
Also when the data from the userform is moved over to the worksheet, another cell has whatever the current TIME happens to be placed into it (and formatted as shown):
the code for this:
Code:
With Cells(3, lCol + 2)
.Value = Now()
.Value = TimeValue(.Value)
.NumberFormat = "h:mm:ss AM/PM"
End With
So out on the worksheet, and in the specific cell listed above, it looks like this:
here's my problem and my request:
I need to have the two cells listed above combined. The result of combining those 2 cells (the DATE cell in -> (10, lCol + 2), and the TIME cell in -> (3, lCol + 2) ) needs to look like the example shown below and placed into: (6, lCol + 1) .
The resulting cell in (6, lCol + 1) after being combined and formatted correctly needs to look like THIS:
Thank you in advance for the solution, or suggestions.