Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Canberra, ACT Australia
    Posts
    53

    Unanswered: control placement/attributes on a form

    I have an option group control on a form and wish to change some of the attributes via VB. Some of the attributes change but not the .height attribute. The code I am using is:

    With Me!AmbienceRollerOptionGroup
    .Height = 1300
    .Top = 2607
    .Left = 113
    .Visible = True
    .Enabled = True
    End With

    the .top, .left, .visible, and .enabled lines work but not the .height. with all measurements in twips.

    When I attempt to change the height, the option group bottom line of the frame doesn't move and hence the option group appears in an elongated box.


    Has anyone met this before, and if so how did you overcome the frustration?

    Regards

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    I have tried your code and it works fine for me. I've tried many different things to try and create your problem, but it just seems to do as expected. The only thing I can think of is that you have an On Error Resume and you have run out of form to allow the new control size to fit. Normally you will get an error when this happens, but it wont be displayed if you have On Error Resume Next above the code.

  3. #3
    Join Date
    Jul 2003
    Location
    Canberra, ACT Australia
    Posts
    53
    Cyb
    thanks for the assist, but resume wasn't/isn't the problem. I tried a dummy control group with the same result as my problem. However, within the control group I changed the attributes of the checkboxes and labels ie visible/enabled/top/left etc and then changed the height and placement of the frame and voila! magic everything was 'right'. The internal checkbaxes had previously moved etc but the frame stayed elongated. Now eveything appears alright, so, make any changes to the frame last.

    Cheers

Posting Permissions

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