Can't Close Excel

Pullingmyhairout

New Member
Joined
Apr 7, 2016
Messages
29
Good Evening,

Hoping someone can assist me. I have put putting together an excel spread sheet and have been using some VBA code. I am a novice amongst novices and have gathered all the code from around the web and it does exactly as i need and works perfectly.

I used excel 2010 to create my spreadsheet and everything works fine...the issue is if I open the file using excel 2013 (haven't tried 2016) I can not use the x to close the program even if i disable the vba code that hides the ribbon. The only time i'm able to use the X to close out of the program is if i navigate to the very first sheet.

All help is appreciated. thank you.

A link to my excel file is below

https://www.dropbox.com/s/2hlfwefksom3be9/Book8.7.xlsm?dl=0
 
Upon opening your workbook, I can click the X to close it in both 2013 and 2016.

Yes upon initially opening the workbook if you do not navigate to another sheet you can close it. Once you navigate to another sheet the ability to close the workbook no longer works
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Are any of your sheets protected.....I'm guessing that the worksheet_activate code is where the problem lies.....try commenting out that code and see what happens
 
Upvote 0
Add this to a normal module:

Code:
Sub ResetScrollBars()
    With ActiveWindow
        .DisplayHorizontalScrollBar = True
        .DisplayVerticalScrollBar = True
    End With

End Sub

and then change the Worksheet_Deactivate code of the startup sheet to this:

Code:
Private Sub Worksheet_Deactivate()
'On worksheet open turn off scroll bars.
Application.OnTime Now(), "ResetScrollBars"
End Sub
 
Upvote 0

Forum statistics

Threads
1,217,256
Messages
6,135,499
Members
449,943
Latest member
thsix

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