T
Toni
I have a form with a memo field for a report to be written
in. I also have a button on the form which will add
the 'persons' name to the form to save typing it. The
code also re-positions the cursor at the end of the text
to allow continuation of typing. The code is this:
--------------------------------------------------
Private Sub cmdGirlsName_Click()
Comments.SetFocus
Comments.Text = (Comments.Text & " " & girlsName)
SendKeys "^{END}", True
End Sub
--------------------------------------------------
This works great when the button is clicked. I also have
a keyboard shortcut, alt+g, which I set using & in the
button's caption. When you use alt+g the cursor is not
position at the end of the text but at the beginning of
the text (which is the default). Does anybody know
another way I can code this so it works when the button is
clicked and also when the shortcut is used?
Is it something to do with the button having control
during the code running, and then returns control to the
memo box, which then positions the cursor according to the
default?
Many thanks for any help.
Toni
in. I also have a button on the form which will add
the 'persons' name to the form to save typing it. The
code also re-positions the cursor at the end of the text
to allow continuation of typing. The code is this:
--------------------------------------------------
Private Sub cmdGirlsName_Click()
Comments.SetFocus
Comments.Text = (Comments.Text & " " & girlsName)
SendKeys "^{END}", True
End Sub
--------------------------------------------------
This works great when the button is clicked. I also have
a keyboard shortcut, alt+g, which I set using & in the
button's caption. When you use alt+g the cursor is not
position at the end of the text but at the beginning of
the text (which is the default). Does anybody know
another way I can code this so it works when the button is
clicked and also when the shortcut is used?
Is it something to do with the button having control
during the code running, and then returns control to the
memo box, which then positions the cursor according to the
default?
Many thanks for any help.
Toni