Maximized Workbook

S

Stephen Newman

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?
 
J

JLGWhiz

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
 
S

Stephen Newman

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

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.
 
S

Stephen Newman

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.
 
J

JLGWhiz

There are hundreds of books written on Excel and VBA. IMO, if an individual
can remember all of the quirks and idiosyncrosies of the applications, they
are abnormal. Therefor, when I have a problem, I don't feel like a dummy if
the answer is simple. I just blame it on senility.

Glad you found the solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top