Hello:
I've created a user form which among other things has DTPicker1 and DTPicker2.
DTP1 is for the date and DTP2 for the time.
When adding the information to the spread sheet, I'd like the date and time to appear in the same cell - so they look like this:
21/03/2013 09:30, but am not sure how to go about this.
Currently my code is similar to this:
Private Sub cmdAdd_Click()
ActiveWorkbook.Sheets("Workflow").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtAgmt.Value
ActiveCell.Offset(0, 1) = txtID.Value
ActiveCell.Offset(0, 2) = txtPartner.Value
ActiveCell.Offset(0, 3) = txtDeal.Value
ActiveCell.Offset(0, 4) = txtTerritory.Value
ActiveCell.Offset(0, 5) = DTPicker1.Value
ActiveCell.Offset(0, 6) = DTPicker2.Value
ActiveCell.Offset(0, 7) = txtDraftTime.Value
ActiveCell.Offset(0, 8) = txtAddTime.Value
ActiveCell.Offset(0, 9) = cboInstructor.Value
ActiveCell.Offset(0, 10) = cboTask.Value
Range("A1").Select
Response = MsgBox("Would you like to add another entry?", _
vbQuestion + vbYesNo)
If Reponse = vbNo Then Exit Sub
Call UserForm_Initialize
End Sub
Any suggestions or comments gladly appreciated.
Bookmarks