Sub RealFullScreen()
With Application
.DisplayFullScreen = True
.CommandBars(1).Enabled = False
.CommandBars("Full Screen").Controls(1).OnAction = "RestoreWindow"
End With
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
End Sub
'取消全屏显示
Sub RestoreWindow()
With Application
.DisplayFullScreen = False
.CommandBars(1).Enabled = True
.CommandBars("Full Screen").Reset
End With
With ActiveWindow
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
End Sub
原来仔细一看是这个代码,我这里可以运行没有问题