How to move to the end of a field to insert text

D

Darrell Childress

I am trying to automate a function for our shipping department to enter
shipping tracking numbers for UPS shipments. The Tracking Number is the
same for all shipments except for the last 4 digits. I have created a
macro to enter the beginning of the Tracking number and then to move the
cursor to the "TrackingNo" field so that the last 4 digits can be
entered. However, when the cursor is moved to the field, it selects the
text that is entered. How can I do this to move the cursor to the end of
the field?
Thanks for any help,
Darrell
 
A

Allen Browne

See help on SelStart, SelLength, and Len().

If we are talking uncommitted changes here, you will need to work with the
Text property of the control, not its Value.
 
R

RuralGuy

Darrell Childress said:
I am trying to automate a function for our shipping department to
enter shipping tracking numbers for UPS shipments. The Tracking Number
is the same for all shipments except for the last 4 digits. I have
created a macro to enter the beginning of the Tracking number and then
to move the cursor to the "TrackingNo" field so that the last 4 digits
can be entered. However, when the cursor is moved to the field, it
selects the text that is entered. How can I do this to move the cursor
to the end of the field?
Thanks for any help,
Darrell

Hi Darrell,

Use the Help system and look up SelLength and SelStart. They will do
exactly what you desire.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top