Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default disable close and shrink buttons

Hello,
I've been looking for a way to disable the close ("X") and shrink buttons that are located at the upper-right part of the spreadsheet. This will ensure that the user uses the button containing the macros I have created.

Is this possible? Please help.

thanks in advance,
Jason

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default disable close and shrink buttons

Jason, it's not only possible.. it's easy :)

lock the windows of the activebook:

tools/protect/workbook
structure OFF
windows ON

PLUS
in this workbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Not blnByCode Then Cancel = True
End Sub


where blnByCode is a module lavel boolean variable you can set in your
other macor to close the workbook.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Jason L." wrote:

Hello,
I've been looking for a way to disable the close ("X") and shrink
buttons that are located at the upper-right part of the spreadsheet.
This will ensure that the user uses the button containing the macros I
have created.

Is this possible? Please help.

thanks in advance,
Jason



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default disable close and shrink buttons

Thanks a lot keepITcool! It works like a charm!

-----Original Message-----
Jason, it's not only possible.. it's easy :)

lock the windows of the activebook:

tools/protect/workbook
structure OFF
windows ON

PLUS
in this workbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Not blnByCode Then Cancel = True
End Sub


where blnByCode is a module lavel boolean variable you

can set in your
other macor to close the workbook.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Jason L." wrote:

Hello,
I've been looking for a way to disable the close ("X")

and shrink
buttons that are located at the upper-right part of

the spreadsheet.
This will ensure that the user uses the button

containing the macros I
have created.

Is this possible? Please help.

thanks in advance,
Jason



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My CheckBoxes and Option Buttons Grow/Shrink each time I click the Memphis Excel Discussion (Misc queries) 1 April 15th 09 08:51 PM
My Buttons shrink with every click [email protected] Excel Worksheet Functions 3 April 3rd 07 07:10 PM
Disable Close all Windows rjvega Excel Discussion (Misc queries) 1 November 7th 06 03:23 PM
Disable Close Button dan Excel Discussion (Misc queries) 5 September 22nd 06 07:39 PM
Disable Macros --> Close File [email protected] Setting up and Configuration of Excel 3 August 24th 05 10:22 PM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"