setting userform-screen fit

G

Guest

I have about 27 fields to be inserted in userform for updation with
texboxes.The user form I created is long in size.Is it possible to resize it
by inserting these text boxes in a list box with vertical scroll bar ?. How
to create user form for the above task and code ?
 
H

halimnurikhwan

Hi Raju,

May be you can more specific, so someone else
easily know what you mean.
I mean reexplain your problem.

thanks,
halim

TUNGANA KURMA RAJU menuliskan:
 
P

Peter T

You can't put controls in a listbox.

Add a vertical Scrollbar (Scrollbars - 2) and set ScrollHeight to suit.
You can apply the scroll bar either to the form to a Frame containing your
textboxes.

Or do you mean use a listbox as your means of data entry. That would be
viable with say a two column listbox (field, data) and a single textbox.
Change events in each to update the other.

Regards,
Peter T
 
G

Guest

Thank you,With 27 text boxes vertically my userform is long enough,does not
fit my desktop screen.Only five text boxes are visible always.Can my user
form be set small size ? Is there any method to scroll the text boxes using
scrol bar ?
 
G

Guest

Thank you,I am a novice to user forms.What you said is correct ,I added a
frame to my user form added all 27 text boxes,but after adding a scroll bar
,it has stuck up .What went wrong
 
P

Peter T

Are you sure you put your textboxes 'in' the frame and not merely over it.

Drag your original userform into a new workbook.
Make the form as large as necessary to fit all the textboxes (even if it
means scrolling down in the VBE)

Add a frame control and size it to fit all the textboxes.
Select all the textboxes and Cut
Select the frame (handles appear)
Paste the textboxes
(ensure the frame has handles when you put controls into it)
Note the height of the frame that allows all textboxes visible.
Resize the Frame and the form to suit
Select the frame
Add the vertical scrollbar and set the scrollheight property you noted
earlier.

Comment all code in the form module
press F5

Regards,
Peter T
 
G

Guest

Thanks,Your help is highly appreciated.

Peter T said:
Are you sure you put your textboxes 'in' the frame and not merely over it.

Drag your original userform into a new workbook.
Make the form as large as necessary to fit all the textboxes (even if it
means scrolling down in the VBE)

Add a frame control and size it to fit all the textboxes.
Select all the textboxes and Cut
Select the frame (handles appear)
Paste the textboxes
(ensure the frame has handles when you put controls into it)
Note the height of the frame that allows all textboxes visible.
Resize the Frame and the form to suit
Select the frame
Add the vertical scrollbar and set the scrollheight property you noted
earlier.

Comment all code in the form module
press F5

Regards,
Peter T
 

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