Input on a user form

R

Risky Dave

Hi,

I have a user form that captures input from the user (at most, just a couple
of numbers) and then uses this input elsewhere.

I want to do is have the user press the enter key to show that they have
completed their selection. The intention is to not have an "ok" type button
on the form (purely for aesthetic reasons!).

How do I set up the textbox or code on the form to do this?

TIA

Dave
 
K

Kent Prokopy

Add the CommandButton to your form,
Set the Visable=True
Set the Default=True
Set the Enabled=True

Add code to it's click event and drag the button of the form area, This way
it is there but off to the side where noone can see it.
 
R

Rick Rothstein

....or, instead of dragging it off screen, you could just size the
CommandButton to be smaller than the TextBox, then place it inside the same
area as the TextBox and click Format/Order/SendToBack on the VB editor's
menu bar to hide it behind the TextBox.
 

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