Excel více monitorů
Napsal: 02 srp 2018 12:14
V E2010 jsem používal níže uvedené makro, které mi umístilo dvě excelová okna na dva monitory. V E2013 nefunguje. Prosím o radu jak opravit.
děkuji
Milan
Option Explicit
'Maximize Excel Across All Monitors
'Category: General VBA | [Item URL]
'
'If you've ever worked on a computer that has more than one monitor attached, you're probably hooked. It's great for VBA developers, because they can have Excel displayed on one monitor, and the VBA Editor displayed on another monitor.
'
'In some cases, you might want Excel's window to display across all monitors, to maximize the amount of data that you can see. When you maximize Excel's window, it fills only the current monitor. To display Excel across multiple monitors, you must do it manually:
'
'1.Make sure that the Excel window is not maximized.
'2.Drag Excel's window to the upper left corner of the first monitor
'3.Drag its left and bottom borders to fill all of your virtual screens.
'Here 's Excel in a 3200 x 1200 window:
'
'Here 's a simple macro that eliminates the manual work and causes Excel's window to display across all monitors:
Private Const SM_CXVIRTUALSCREEN = 78
Private Const SM_CYVIRTUALSCREEN = 79
Private Declare Function GetSystemMetrics Lib "user32" ( _
ByVal nIndex As Long) As Long
Sub FillVirtualScreen()
With Application
.WindowState = xlNormal
.Left = 63
.Top = 0
' .Width = GetSystemMetrics(SM_CXVIRTUALSCREEN)
.Width = 2800
' .Height = GetSystemMetrics(SM_CYVIRTUALSCREEN)
.Height = 902
End With
ActiveWindow.WindowState = xlNormal
With ActiveWindow
.Top = 2.4
.Left = 1.69
.Width = 1090
.Height = 535
End With
Windows.Arrange ArrangeStyle:=xlVertical
End Sub
'Note that the Excel window is not really maximized. In other words, you can drag the title bar to a different position. I don't know of any way to truly maximize Excel across multiple monitors.
děkuji
Milan
Option Explicit
'Maximize Excel Across All Monitors
'Category: General VBA | [Item URL]
'
'If you've ever worked on a computer that has more than one monitor attached, you're probably hooked. It's great for VBA developers, because they can have Excel displayed on one monitor, and the VBA Editor displayed on another monitor.
'
'In some cases, you might want Excel's window to display across all monitors, to maximize the amount of data that you can see. When you maximize Excel's window, it fills only the current monitor. To display Excel across multiple monitors, you must do it manually:
'
'1.Make sure that the Excel window is not maximized.
'2.Drag Excel's window to the upper left corner of the first monitor
'3.Drag its left and bottom borders to fill all of your virtual screens.
'Here 's Excel in a 3200 x 1200 window:
'
'Here 's a simple macro that eliminates the manual work and causes Excel's window to display across all monitors:
Private Const SM_CXVIRTUALSCREEN = 78
Private Const SM_CYVIRTUALSCREEN = 79
Private Declare Function GetSystemMetrics Lib "user32" ( _
ByVal nIndex As Long) As Long
Sub FillVirtualScreen()
With Application
.WindowState = xlNormal
.Left = 63
.Top = 0
' .Width = GetSystemMetrics(SM_CXVIRTUALSCREEN)
.Width = 2800
' .Height = GetSystemMetrics(SM_CYVIRTUALSCREEN)
.Height = 902
End With
ActiveWindow.WindowState = xlNormal
With ActiveWindow
.Top = 2.4
.Left = 1.69
.Width = 1090
.Height = 535
End With
Windows.Arrange ArrangeStyle:=xlVertical
End Sub
'Note that the Excel window is not really maximized. In other words, you can drag the title bar to a different position. I don't know of any way to truly maximize Excel across multiple monitors.