+ Reply to Thread
Results 1 to 4 of 4

Form Position

  1. #1
    Registered User
    Join Date
    06-23-2011
    Location
    FL
    MS-Off Ver
    Excel 2003, 2010
    Posts
    4

    Form Position

    All -

    I've been working to create a pop-up calendar that does not use ActiveX, works across multiple excel versions, and looks virtually the same on all versions, supports keyboard interactions, is contained with a single file, and more. All is well, I have a few bugs to fix and ideas I still would like to implement (ISO week numbers, quick option for jumping to today, etc).

    Anyhow, one of the biggest challenges that I have remaining, is how do I control placement of the form. I've gone with API calls to remove the title bar and make the pop-up modeless. So I expect some relatively fixed offset in placement. However, the Form placement appears relative to the screen edge, not the window edge.

    I've tried Chip Pearson's FormPositioner, but without consistent success in Excel 2010. I have attached Calendar.xlsm I'm using.

    Also, if someone wants to contribute to my little activity, I'll gladly take some assistance, just let me know. While other calendars are available, which is where I received inspiration, none of them seem to "fit in" with a well formated, functional spreadsheet.

    Anyhow, all I'm looking for now is form placement. Thanks for any assistance.
    Attached Files Attached Files

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Form Position

    Hi Kenny3794,

    I like what you are doing here and I don't really have anything to add that helps with your project. In saying that, I ran it on my personal computer which uses Office Pro 2010 64, and it was relative to my screen just like you said. The calendar would stay running for me though, as soon as I hit Ctrl+F5 it flashed on and then off again. I stepped through the code (almost) line after line and it didn't error or trigger any error catches so I don't really know why it won't stay up. I am going to study this a bit though and try to figure out why it's doing that, unless someone else does.

    Regards
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Registered User
    Join Date
    06-23-2011
    Location
    FL
    MS-Off Ver
    Excel 2003, 2010
    Posts
    4

    Re: Form Position

    Quote Originally Posted by Mordred View Post
    Hi Kenny3794,

    I like what you are doing here and I don't really have anything to add that helps with your project. In saying that, I ran it on my personal computer which uses Office Pro 2010 64, and it was relative to my screen just like you said. The calendar would stay running for me though, as soon as I hit Ctrl+F5 it flashed on and then off again. I stepped through the code (almost) line after line and it didn't error or trigger any error catches so I don't really know why it won't stay up. I am going to study this a bit though and try to figure out why it's doing that, unless someone else does.

    Regards
    I have seen no issue with pressing any invalid keys. Ctrl + F5 does nothing on my PC. The programming only responds to Arrow keys, Page Down, Page Up, ESC, and Enter. Anyone else able to help with the form positioning? Thanks.

  4. #4
    Registered User
    Join Date
    06-23-2011
    Location
    FL
    MS-Off Ver
    Excel 2003, 2010
    Posts
    4

    Re: Form Position

    Quote Originally Posted by kenny3794 View Post
    Anyone else able to help with the form positioning? Thanks.
    So, I had a semi-stroke of genious. I can use Application.Left and Application.Top to offset the position of the form with regards to the Application location.

    HOWEVER, there remains two positioning issues that I cannot find information for. The first is while the RIBBON's state (ie expanded vs collapsed) affects placement. Also, the position of a cell is relative to cell A1, not on the display. Thus, if I fill this down to cell 200, then double click on cell D200, the form is off the screen!

    EDIT: I noticed that ActiveWindow.VisibleRange has a .Top and .Left value. I can use these to get the form close, but still not exactly where I want it.

    Again, any help is appreciated.
    Last edited by kenny3794; 07-29-2011 at 12:30 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1