Results 1 to 15 of 15

Thread: A date picker userform for Mac.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Apr 2015
    Posts
    2
    Location
    Sorry to resurrect an old discussion, but I can't figure out why the user form provided my Mike resizes based on the location of the Cancel button. I downloaded the sample file, and am just looking to move the Cancel and OK buttons below the calendar vs. to the right of the calendar. When I do this, the with of the entire form automatically resizes to where ever the cancel button is located. Example: If i move the cancel button to below the calendar to the left, the width of the entire form shrinks (see attached image). Conversely, if I move the Cancel button way out to the right the form expands. Note: the OK button seems to have no impact on the form size.

    I can't seem to figure out what's causing this. Any help would be appreciated.

    2015-04-11_11-34-20.jpg

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Quote Originally Posted by dmc311 View Post
    ... looking to move the Cancel and OK buttons below the calendar vs. to the right of the calendar. ....
    Change this section in the Useform_Activate code.
    With Me
            .Height = Application.Max(.butCancel.Top + .butCancel.Height + 10, frameUserEntryControls.Top + .frameUserEntryControls.Height + 35) + (.Height - .InsideHeight)
            .Width = Application.Max(2 * .frameUserEntryControls.Left + .frameUserEntryControls.Width, .butCancel.Left + .butCancel.Width + 10) + (.Width - .InsideWidth)
            .Tag = "shown"
        End With

Posting Permissions

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