Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-08-2013, 05:11 AM
MikeyChris MikeyChris is offline PW protected XLSX won't open maximized Windows 7 64bit PW protected XLSX won't open maximized Office 2010 32bit
Novice
PW protected XLSX won't open maximized
 
Join Date: Aug 2013
Posts: 15
MikeyChris is on a distinguished road
Default PW protected XLSX won't open maximized

Hello,
I have several password protected workbooks and I can't get any of them to open maximized. Regardless of what size the window is when I close the wb, when I open it again it is full width, half height centered. I have set the shortcut to the workbook to run maximized, but it doesn't care. Un-pw protected wb's behave (i.e. open as they were when last closed).
Any idea why a pw protect wb won't obey the rules? Is there a vba script I can insert somewhere to make all wb's open maximized? I thought I had already done this in my personal workbook (is that the right name?) but can't find it anywhere. As you can see, I'm not up to speed on all this, so any detailed help is appreciated.
Reply With Quote
  #2  
Old 09-08-2013, 08:44 PM
excelledsoftware excelledsoftware is offline PW protected XLSX won't open maximized Windows 7 64bit PW protected XLSX won't open maximized Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

Quote:
Originally Posted by MikeyChris View Post
Hello,
I have several password protected workbooks and I can't get any of them to open maximized. Regardless of what size the window is when I close the wb, when I open it again it is full width, half height centered. I have set the shortcut to the workbook to run maximized, but it doesn't care. Un-pw protected wb's behave (i.e. open as they were when last closed).
Any idea why a pw protect wb won't obey the rules? Is there a vba script I can insert somewhere to make all wb's open maximized? I thought I had already done this in my personal workbook (is that the right name?) but can't find it anywhere. As you can see, I'm not up to speed on all this, so any detailed help is appreciated.
When you protected it. What options did you enable? window structure is one of them which may be the reason.
Reply With Quote
  #3  
Old 09-09-2013, 05:45 AM
MikeyChris MikeyChris is offline PW protected XLSX won't open maximized Windows 7 64bit PW protected XLSX won't open maximized Office 2010 32bit
Novice
PW protected XLSX won't open maximized
 
Join Date: Aug 2013
Posts: 15
MikeyChris is on a distinguished road
Default

Quote:
Originally Posted by excelledsoftware View Post
When you protected it. What options did you enable? window structure is one of them which may be the reason.
Well, to be honest, I don't recall *HOW* I even gave them passwords, so I just saved one and gave a PW to it. Here's what I did:
1)Opened file (before adding PW)
2)Clicked FILE tab on ribbon
3)Clicked SAVE AS
4)Clicked TOOLS drop down (next to SAVE button)
5)Clicked GENERAL OPTIONS
6)There are only 4 choices:
a) ALWAYS CREATE BACKUP check box (not checked)
b) PASSWORD TO OPEN (I entered a PW)
c) PASSWORD TO CLOSE (I entered a PW)
d) READ ONLY RECOMMENDED check box unchecked

I was asked to reenter both passwords, and that was it. I didn't see anyother options. I think there are a couple other ways to protect spreadsheets, but this is the method I used (I am NOT a power user).
Thanx,
Mike
Reply With Quote
  #4  
Old 07-03-2023, 12:20 AM
StuW StuW is offline PW protected XLSX won't open maximized Windows 10 PW protected XLSX won't open maximized Office 2010
Novice
 
Join Date: Jul 2023
Posts: 1
StuW is on a distinguished road
Default RE: Password protected XLSX won't open maximized

Old thread now, but here is how I fixed this.
Note that this is not elegant! And purely based on my observations, not rigorous analysis.

Background:
There appears to be a bug in Excel 2010 (and likely later versions) when opening password protected files. Something about the on-open password popup box seems to result in Excel defaulting to a non-maximised size, regardless of whether you configure Run=Maximised in the Excel shortcut. Note that if Excel is already open and maximised prior to opening the password-ed file, then it stays maximised ok.

Solution.
Note: Please google concepts below (eg 'Personal.xlsb') if you don't know how they work.

I have seen posts stating the solution is to add VBA code to Personal.xlsb, executed when any workbook is opened. This code triggers off the 'Workbook_Open' event to force the window to maximised. Unfortunately I found this did not work for password protected files. The 'Workbook_Open' event appears to occur BEFORE the worksheet password popup, and it looks like the popup is somehow overriding any prior attempt to maximise the workbook.

After a little playing around, I found a workaround that works for me. The VBA 'Application.OnTime' function can be added to defer the above maximisation for a second, which seems to be enough to place it AFTER whatever the password popup box is doing. As a result Excel is maximised immediately after a password is entered. Yes, this doesnt 100% make sense, but worked when nothing else would!

Within Personal.xlsb:
1) Add the following VBA under "MicrosoftExcelObjects / ThisWorkbook"

Private Sub Workbook_Open()
Application.OnTime (Now() + TimeValue("00:00:01")), "MaximiseExcel"
'1 second delay seems to be enough. Try a little more if this doesnt work reliably.
End Sub

2) Create a new module under "Modules" with the following:

Sub MaximiseExcel()
Application.WindowState = xlMaximized
End Sub
Reply With Quote
Reply

Tags
openmaximized, password, protected



Similar Threads
Thread Thread Starter Forum Replies Last Post
Office Compatibility Pack - will not open xlsx Meeker Excel 6 02-20-2022 12:11 AM
PW protected XLSX won't open maximized Cannot open emailed documents in Word 2010 - Protected View Andrewjmarino Word 8 09-05-2013 03:58 PM
Open xlsx and doxc at the same time marco24 Office 2 03-15-2013 07:26 AM
How to open a password-protected word document? navalava Word 1 07-01-2012 12:15 PM
PW protected XLSX won't open maximized Excel won't open maximized from URL jdanton Excel 2 09-24-2009 08:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft