ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Maximized Workbook (https://www.excelbanter.com/excel-programming/413100-maximized-workbook.html)

Stephen Newman[_2_]

Maximized Workbook
 
I have a workbook with several macros I've been modifying for years. I
created it using XL2003. It works perfectly with that version of XL,
however, the company I work for uses XL2000. I don't know what I've
done to make the workbook minimize/maximize/close buttons disappear,
but they have. The workbook opens fine in XL2000, but it does not
expand to fill the XL program container. It sits unmovable on the left
side without any buttons. It won't even scroll. I know I did something
years ago that did that thinking I'd always use XL2003....but I was
mistaken.

Is there a way I can restore the buttons, or at least maximize it to
fit the application?

JLGWhiz

Maximized Workbook
 
Run this and see if it helps:

Sub restoreXL()
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
With ActiveWindow 'This with statement sets everything to normal
.WindowState.xlMaximized
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayHeadings = True
.DisplayGridlines = True
End With
End Sub





"Stephen Newman" wrote:

I have a workbook with several macros I've been modifying for years. I
created it using XL2003. It works perfectly with that version of XL,
however, the company I work for uses XL2000. I don't know what I've
done to make the workbook minimize/maximize/close buttons disappear,
but they have. The workbook opens fine in XL2000, but it does not
expand to fill the XL program container. It sits unmovable on the left
side without any buttons. It won't even scroll. I know I did something
years ago that did that thinking I'd always use XL2003....but I was
mistaken.

Is there a way I can restore the buttons, or at least maximize it to
fit the application?


Stephen Newman[_2_]

Maximized Workbook
 
On Tue, 24 Jun 2008 17:32:01 -0700, JLGWhiz
wrote:

Thanks, but no.

The .windowstate throws a compile error with ActiveWindow. If I move
it to Application it runs, but I still don't have the workbook
buttons. If I open another workbook the minimize/maximize/close
buttons appear in the newly opened workbook, but when I switch back to
the original workbook they're still gone.



Run this and see if it helps:

Sub restoreXL()
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
With ActiveWindow 'This with statement sets everything to normal
.WindowState.xlMaximized
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayHeadings = True
.DisplayGridlines = True
End With
End Sub





"Stephen Newman" wrote:

I have a workbook with several macros I've been modifying for years. I
created it using XL2003. It works perfectly with that version of XL,
however, the company I work for uses XL2000. I don't know what I've
done to make the workbook minimize/maximize/close buttons disappear,
but they have. The workbook opens fine in XL2000, but it does not
expand to fill the XL program container. It sits unmovable on the left
side without any buttons. It won't even scroll. I know I did something
years ago that did that thinking I'd always use XL2003....but I was
mistaken.

Is there a way I can restore the buttons, or at least maximize it to
fit the application?


Stephen Newman[_2_]

Maximized Workbook
 
I must have known I'd run into this problem years ago. Tom Ogilvy
answered this question way back in 2002. I have an xlVeryHidden sheet
with some programming notes on it, and I'd pasted an entire post on
this subject there.

If the workbook is protected and 'windows' is selected the buttons are
not available. In fact they're not even there.

I simply unprotected the workbook and they reappeared.

Certainly this is one of the reasons the '.... for Dummies' line of
books has been published.


On Tue, 24 Jun 2008 17:32:01 -0700, JLGWhiz
wrote:

Run this and see if it helps:

Sub restoreXL()
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
With ActiveWindow 'This with statement sets everything to normal
.WindowState.xlMaximized
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayHeadings = True
.DisplayGridlines = True
End With
End Sub





"Stephen Newman" wrote:

I have a workbook with several macros I've been modifying for years. I
created it using XL2003. It works perfectly with that version of XL,
however, the company I work for uses XL2000. I don't know what I've
done to make the workbook minimize/maximize/close buttons disappear,
but they have. The workbook opens fine in XL2000, but it does not
expand to fill the XL program container. It sits unmovable on the left
side without any buttons. It won't even scroll. I know I did something
years ago that did that thinking I'd always use XL2003....but I was
mistaken.

Is there a way I can restore the buttons, or at least maximize it to
fit the application?



All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com