Mega Code Archive

 
Categories / VisualBasic Script / Application
 

Set the window position and size

Sub win()     Dim myWindow1 As Window, myWindow2 As Window     Set myWindow1 = ActiveWindow     Set myWindow2 = myWindow1.NewWindow     With myWindow1         .WindowState = xlNormal         .Top = 0         .Left = 0         .Height = Application.UsableHeight         .Width = Application.UsableWidth * 0.25     End With     With myWindow2         .WindowState = xlNormal         .Top = 0         .Left = (Application.UsableWidth * 0.25) + 1         .Height = Application.UsableHeight         .Width = Application.UsableWidth * 0.75     End With End Sub