Tech Support banner
Status
Not open for further replies.
1 - 7 of 7 Posts

·
Registered
Joined
·
208 Posts
Discussion Starter · #1 ·
Excel Office 2003 SP2, v.11.8105

I got a complaint about a user having multiple spreadsheets open and then clicking on the program X to close the one sheet and it closes Excel and *all* the spreadsheets. Of course, there's a small black X to close the sheet just under the program X, but apparently, that's too hard.

Anyone know of a setting anywhere or of a UI tweak that changes this so the red program x just closes the one spreadsheet?
 

·
Registered
Joined
·
208 Posts
Discussion Starter · #3 ·
Hi

There is an easy way that involves VBA code, but my question would then be - "How should the workbook be closed?" Do you have a button that could be used instead?

Greetings -

He just wants to close individual spreadsheets by using the program X instead of the little black X, which is located just underneath the program X.

It is apparently easier to reprogram the computer then to reprogram the user.
 

·
Security Manager, Analyst , Rangemaster, TSF Acade
Joined
·
39,538 Posts
LOL...

I asked my question because using code I can disable the closure of Excel and therefore any open workbooks. However, an alternative method of closure is therefore required otherwise you won't be able to close any workbook ever again! The most common way is to put a button on a sheet or other location that can initiate the close.

So, before I provide your closure solution, I'd like to be sure that you are fully aware that you need to arrange a button or alternate means of allowing users to close each workbook they open.

Does that make sense?
 

·
Registered
Joined
·
208 Posts
Discussion Starter · #5 ·
Does that make sense?
Certainly does.

So, I'm assuming that MS figured that closing Excel was just supposed to work fine this way and did not allow a user access to make this particular change themselves without editing code? And why is that I'm I not suprised? :grin:

Functionality. Functionality. Functionality.
 

·
Security Manager, Analyst , Rangemaster, TSF Acade
Joined
·
39,538 Posts
LOL!

OK - a quick demo. Open a new workbook and add this code to ThisWorkbook module:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = True
End Sub
Save the workbook with any name and then try and close it with the small x or the large X.
 
1 - 7 of 7 Posts
Status
Not open for further replies.
Top