Odd question I don't know how to give a title to :-)

Started by David_H, June 09, 2010, 05:34:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

David_H

I have several monitors and two of them are 30" monitors stacked on top of each other.  I like having Visio open and spread between the two of them vertically.  Since I am usually working on 36" x 24" blueprints this allows me to see the entire page vertically, but not horizontally.  So I then have to scroll back and forth horizontally to see the entire page - and I would like to be able to do so much quicker.

Is there any way for me to program a toggle command/shortcut so that when I clicked it on the ribbon or used a shortcut key that the drawing instantly flips from the left to the right and visa versa when pressed again?  If necessary it would be just as acceptable if it were two discrete commands instead of one, one command for "left" and one command for "right".

Thanks

geh_heim

Just so i understand you correctly ...

you want that you can scroll from the left to the right with one click right?
not some rotation or something like that?

David_H

 I am not sure what you mean by rotation but yes to what you said, I want to scroll from left to right with a click.  Let me explain it further.  I don't even want to "scroll" per se, that's just the word I use because it's what gets you to the other side of the drawing.  Think of the "fit to window" command as an example.  You click on that and the drawing instantly fits to the window.  In the same way I would like to have a command named "right" and a command named "left" that instantly moved the drawing so that the right 50% filled the screen or the left 50% filled the screen.  However the size of the drawing would stay the same.  Make sense?  If not I can do a drawing that will make it clear.

Thanks

geh_heim

ok played around instead of doing my work ^^'

you could of course use pan and zoom window but thats not what you want i think

Sub top()
    Dim x, y, temp As Long
    x = Visio.ActivePage.PageSheet.Cells("PageWidth").ResultIU
    y = Visio.ActivePage.PageSheet.Cells("PageHeight").ResultIU
    temp = y * 0.5
    Application.ActiveWindow.SetViewRect 0, y, x, temp

End Sub

Sub bottom()
    Dim x, y, temp As Long
    x = Visio.ActivePage.PageSheet.Cells("PageWidth").ResultIU
    y = Visio.ActivePage.PageSheet.Cells("PageHeight").ResultIU
    temp = y * 0.5
    Application.ActiveWindow.SetViewRect 0, temp, x, temp

End Sub


these two smal macro show top und lower halfe of the page, you just need to refit them for left and right.
oh and don't blame me for the useless variable naming, that was just some small test.

David_H

Thanks so much geh_heim, that's just awesome!  I did try pan and zoom but did not find it worked too well for what I am trying to do.  I have never done a macro so don't be surprised if I am back with more questions :).

geh_heim

That's fine with me ;)

i've never done a macro before i found this page too ;D