Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel User Form TextBox

Status
Not open for further replies.

JDJACKSON

Mechanical
Jan 30, 2003
12
0
0
GB
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

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.

Patrick
 
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
 
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.

patrick
 
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
 
Status
Not open for further replies.
Back
Top