Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Excel User Form TextBox

Excel User Form TextBox

Excel User Form TextBox

I created TextBox1 using the Excel Forms menu.  I need to place the numeric data values I enter in cell $A$77.

My Questions are as follows:

1. How do I restrict the TextBox input data to 6 numeric values?
2. How do I release the control of the TextBox by using the enter key after typing data?
3. How do I automatically place the numeric values of the TextBox in cell $A$77?

I am pretty sure this will require written code and any help is appreciated.

J. D. Jackson B.S. M.E. & B.S. E.E.
TransContinental Engineering

Replies continue below

Recommended for you

RE: Excel User Form TextBox

Sounds like you need to use is a combo box or list box. Ask the paper clip for help on "combo box" and read all the information that is returned. The item "About control properties for Forms toolbar list boxes and combo boxes" has an example on how to work with the returned value. No code required.


RE: Excel User Form TextBox

Thanks Patrick, I will take another look at the ComboBox and list box.  The reason for using a TextBox is the actual numbers I enter for the calculation will change from case to case.  What I am doing is calculating the filled weight of segments of pipe with water for a hydrotest.  The segment of pipe may be any number up to 120,000 feet.

J. D. Jackson B.S. M.E. & B.S. E.E.
TransContinental Engineering

RE: Excel User Form TextBox

Without really knowing what you're up to I'll make another guess. An approach I might use would be build a table of water-filled weights per foot with nominal diameters as row headers and schedules as column headers. Use combo boxes to select diameter, schedule and even length. Use the index function (array) to return the intersection of dia and sched in the weight table. Multiply that by the length. Let me know and I can send you an example spreadsheet.


RE: Excel User Form TextBox

Patrick, I sent you the complete file so you can see what I am trying to accomplish.

J. D. Jackson B.S. M.E. & B.S. E.E.
TransContinental Engineering

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close