Carriage Return Within a Textbox to Activate a Macro Function

  • Thread starter Crowbar via OfficeKB.com
  • Start date
C

Crowbar via OfficeKB.com

Hi,

I cannot understand why I having trouble with this one but here goes...

When data is keyed within textbox1 and then the Enter Key is pressed I would
like a function to be activated.

The closest I have got is setting the EnterkeyKeyBehaviour to true so that
the cursor leaves the textbox. Then I have a sub command that activates
because the cursor left the textbox (private sub_exit). This does work but is
a bit rubbish when you leave the textbox to use other functions on the form.

Hope you can help
 
C

Cindy M.

Hi Crowbar,
I cannot understand why I having trouble with this one but here goes...

When data is keyed within textbox1 and then the Enter Key is pressed I would
like a function to be activated.

The closest I have got is setting the EnterkeyKeyBehaviour to true so that
the cursor leaves the textbox. Then I have a sub command that activates
because the cursor left the textbox (private sub_exit). This does work but is
a bit rubbish when you leave the textbox to use other functions on the form.
You might take a look at the KeyDown/KeyUp events in the Help.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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