作者在 2018-09-18 19:29:40 发布以下内容
实现仅包含 9 X 9 个单元格区域的窗口界面。
oExcel=CreateObject("Excel.Application")
WITH oExcel
.WorkBooks.Add
oRange = .Range("A1:I9")
WITH .ActiveWindow
.DisplayHeadings = .F.
.DisplayHorizontalScrollBar = .F.
.DisplayVerticalScrollBar = .F.
.DisplayWorkbookTabs = .F.
.WindowState = xlNormal
UsedW = .Width - .UsableWidth
UsedH = .Height - .UsableHeight
.Width = oRange.Width + UsedW
.Height = oRange.Height + UsedH
.ScrollRow = 1
.ScrollColumn = 1
.ActiveSheet.ScrollArea = oRange.Address
.EnableResize = .F.
ENDWITH
.Visible = .T.
ENDWITH