Kiwi-123
asked on
Userform help
Please can you help with the attached?
If I press the command button, I'd like for the userform to insert the Date & Time into the active/highlighted cell.
Format would be "dd/mm/yy HH:MM" which is both taken from textbox 1&2
So once the "Add" button is pressed, the value is entered into whatever active cell on the worksheet.
Book1.xls
If I press the command button, I'd like for the userform to insert the Date & Time into the active/highlighted cell.
Format would be "dd/mm/yy HH:MM" which is both taken from textbox 1&2
So once the "Add" button is pressed, the value is entered into whatever active cell on the worksheet.
Book1.xls
ASKER
Thanks for your help, seems to work very well. Although two things I noticed is that I get an error message if I put the wrong time in i.e "weer"
The second is that on input it would be great if the next cell is selected to the right. Currently the cursor goes anywhere.
The second is that on input it would be great if the next cell is selected to the right. Currently the cursor goes anywhere.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Add string
.Cells(.Rows.Count, .Columns.Count + 1).Select
after string
.Cells(.Rows.Count, .Columns.Count).Value = D
for selection of next cell
.Cells(.Rows.Count, .Columns.Count + 1).Select
after string
.Cells(.Rows.Count, .Columns.Count).Value = D
for selection of next cell
ASKER
Many thanks for your help Als!
I still get the "weer" problem in textbox 2 if I acknowledge the "Please enter valid time" and then press ADD.
I still get the "weer" problem in textbox 2 if I acknowledge the "Please enter valid time" and then press ADD.
Additional checking was added
Book1.xls
Book1.xls
Book1.xls