How to change windows.arrange from xlTiled to xlHorizontal and back in one procedure

  • Thread starter Thread starter Zdenek Moravec
  • Start date Start date
Z

Zdenek Moravec

I want to create one button, which changes arranging the windows on
the screen from maximized status to tiled, by next clicking from tiled
to horizontal, by next clicking from horizontal back to maximized.
I don't know, how to get ArrangeStyle value to set the next one in one
procedure.
Thank you
Zdenek Moravec
Panasonic AVC Networks Czech
 
Zdenek

I don't either. You'd think that would be a property of Application or
Windows, but I sure can't find it. You could use a module level variable as
a workaround.

Dim lWndState As Long

Sub SwitchView()

Select Case lWndState
Case xlMaximized
Windows.Arrange xlArrangeStyleTiled
lWndState = xlArrangeStyleTiled
Case xlArrangeStyleTiled
Windows.Arrange xlArrangeStyleHorizontal
lWndState = xlArrangeStyleHorizontal
Case Else
ActiveWindow.WindowState = xlMaximized
lWndState = xlMaximized
End Select

End Sub
 
Hello Dick
This is exactly, what I need.
Thank you
Zdenek Moravec
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top