Consulting

Results 1 to 4 of 4

Thread: Solved: Alignment of many controls on user form

  1. #1

    Solved: Alignment of many controls on user form

    Hi,

    I'm working on a survey that asks the user for a rating like school ("A", "B","C", "D", or "F"). Of course, the user may ignore the question (No Answer). There are seven of these, then 4 "Yes/No/No Answer", then 8 "ratings" where the user inputs a "1" to a "5" (or No Answer again). The point of all this is to say that there are many controls that will be on the UserForm. The previous survey was much simpler (4 "Yes/No/No Answer") so aligning the controls was tedious, but doable (12 total controls- mimicks the written survey). With the much larger survey #2, I must believe that there must be a better way to align all these controls.

    For each of the 3 sections of the survey, I'll want all the controls in nice rows and columns. How does one do this? My method on survey # 1 was to try the toolbar. When I would group the related controls, the "align left" or "align top" would be greyed-out, making the toolbar worthless for this purpose. I resorted to going to the properties and changing all the numbers (I guess these numbers are in pixels or something) until the userform looked right.

    I also have an adjacent label field where the survey question is written. This eliminates confusion on the part of the user. The actual survey is hand written; my code is used to populate data sheets so managers can see trends in the data. This is a data capture tool.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Instead of putting similar controls in a group, put them in a Frame, which can be aligned, etc.

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Select the controls on the form and enter a value for Left in the property box. This will align all selected controls.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    Thanks for the advice. It worked!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •