none
How do you modify bottom pane height? RRS feed

  • Question

  • In Project 2010, when you split a window, the panes appear to split the window vertically evenly. You can drag the split up and down with a mouse, but you can't capture the effect of that dragging by recording a macro. Changes to the pane height are not retained with the view. I can't find any references to pane height, only window height.

    I can control horizontally split views, using "Application.SetSplitBar ShowColumns:=", but ShowRows isn't an option.

    Is there a way to control pane height with VBA?


    Dean Carroll

    Tuesday, February 21, 2012 11:16 PM

All replies

  • Unfortunately not. This came up in a post not long ago and no one had a solution.

    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management

    • Marked as answer by DeanLC Wednesday, March 7, 2012 1:50 PM
    • Unmarked as answer by DeanLC Wednesday, March 7, 2012 10:42 PM
    Wednesday, March 7, 2012 1:28 AM
    Moderator
  • Try the good ol' SendKeys command and use Shift+F6 (activates the split bar) followed by the appropriate number of up/down arrow keycodes.

    /Lars Hammarberg

    Dovregroup AB


    //Lars Hammarberg www.camako.se Gold Certified Partner

    • Marked as answer by DeanLC Wednesday, March 7, 2012 10:42 PM
    • Unmarked as answer by DeanLC Thursday, March 21, 2013 6:42 PM
    • Marked as answer by DeanLC Thursday, March 21, 2013 6:45 PM
    • Unmarked as answer by DeanLC Thursday, March 21, 2013 6:46 PM
    Wednesday, March 7, 2012 8:42 PM
  • Lars,

    That was a great solution I had been playing unsuccessfully with mousedown. I just tested your solution and it works great! I love SendKeys too. I just didn't know that Shift-F6 grabbed control of both horizontal and veritical bars. It works whether or not the screen is already split. Thanks!


    Dean Carroll

    Wednesday, March 7, 2012 10:49 PM
  • Sorry about the Unmarked, Marked, Unmarked. I made the mistake of typing a reply, then Unmarking as an answer before submitting the reply. I could no longer find the reply to submit and I couldn't start a new one.

    A year later and I tried finding a working macro for this but I don't have one. Testing your solution manually works great, but for some reason, {UP}, {DOWN}, ~, and {ENTER} do not work after sending Shift F6. {PGDN} and PGUP} work, but when the macro ends, you are left in a state as though you had just pressed Shift F6 then Page Down. If you move the mouse, the location changes. If you add a message box after the sendkeys command without {ENTER} in the keys sent, the Activate the split bar state is gone with no change and you get the message box; if {ENTER}, {DOWN}, or {UP} are included in the keys sent, nothing happens to the split and there is no message.


    Dean Carroll

    Thursday, March 21, 2013 7:12 PM