Force excel to open where last saved

sallymac

New Member
Joined
Aug 30, 2009
Messages
31
I understand that excel opens at the worksheet that was open when the file was last saved. This is what I want to happen. I have 16 worksheets in my workbook and when the file is opened, it (usually, but not always !) opens on sheet 13. This has just started happening, so I have obviously caused it, but I cannot work out how as I have no references at all to Sheet 13 - it is an information sheet only.

Until I work out how to fix it, I would like to force the workbook to open at the worksheet where it was last saved. Can vba help me do this.

Any suggestions would be gratefully received.

Thanks
Sally
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
It is possible ...experts here will look at it soon; please wait ..:)
 
Upvote 0
Insert a vb module...>

Sub Openwb()


Workbooks("Book1").Activate


Sheets("Sheet1").Select


End Sub

Alter it as per yours....Muz:)
 
Upvote 0
Thanks Muz. The workbook won't always be saved with the same sheet open - eg, it won't always be (say) Sheet1 where the workbook is saved.
 
Upvote 0
Hi Sally,

I haven't seen anything like the problem that you describe without VBA being involved.

Do you have VBA in your problem workbook, or any Add-Ins, or any code in your Personal.xlsb file?
 
Upvote 0
Hi JS411
There is no code in my Personal.xlsb and the only Add-In I have is Analysis ToolPak (I lead a simple life !)
Yes there is vba in my workbook and I concede I have probably caused the problem (but as yet can't work out where as there is no code in Sheet 13 and no reference to it at all in any of the other code in other sheets or ThisWorkbook).
As the workbook is used daily by the organisation, I need to make it appear to be working properly (by means of a work-around) until I can figure it out.

Thanks again
Sally
 
Upvote 0
Sally,

The workaround you're asking for might be to use a Workbook_BeforeSave event to store the current sheet and a Workbook_Open event to reset that as the Active Sheet.

Unfortunately, you probably already have Workbook_Open code that is the source of your problem. If that's the case, you can't add a second Workbook_Open procedure, and I wouldn't recommend trying to append code to a Workbook_Open when it's already giving unexpected results.

I'd encourage you to use this forum to get some help to quickly diagnose and fix the bug rather than try to mask it.
Starting in a different sheet might be a slight annoyance to users, but your real risk is that your code is doing some processes that you don't understand and that could possibly affect your data.

Please post the code from your ThisWorkBook module so we can help you fix this properly.
 
Upvote 0

Forum statistics

Threads
1,223,629
Messages
6,173,440
Members
452,515
Latest member
marinacalus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top