Snowflake68
Registered User.
- Local time
- Today, 11:41
- Joined
- May 28, 2014
- Messages
- 464
I have the vba code below on the Double Click Event of a text box on a form. The code enters the current date but I would like the cursor to move to the end of the date ready for the user to enter their task update notes. This works only if the user clicks beneath the last entry but if they click on any of the previous text entries then the the cursor doesnt stay at the end of the text. I know the code is working as I have a message box to confirm the position of the cursor but then it just jumps back to where the user double clicked.
How can I get the cursor to always stay at the end of the date that has just been inserted by the double click event?
Code:
Task_update.Value = Task_update.Value & vbCrLf & Format(Now(), "dd-mm-yy") & ": "
Me.Task_update.SelStart = Me.Task_update.SelStart + Me.Task_update.SelLength
MsgBox Me.Task_update.SelStart
How can I get the cursor to always stay at the end of the date that has just been inserted by the double click event?
Last edited: