Disable Worksheet buttons

SK Manocha

New Member
Joined
Dec 15, 2009
Messages
3
I need to disable the three buttons to minimise, restore and close buttons of the Worksheets for the application I am working on in Excel 07.
Is there any direct method ( as available for userform) and indirect way to do this? A way to keep the window always maximised would do the trick.
Thanks
SKM
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Paste the below into ThisWorkbook module:


Code:
Private Sub Workbook_WindowResize(ByVal Wn As Window)
 
ActiveWindow.WindowState = xlMaximized
 
End Sub
 
Upvote 0
Thanks.
The action suggested takes care of half of the problem. Main Title bar XL logo and Minimise, Restore Down/Maximise and Close buttons are not yet disabled for their action. Possibly the shortcut menu disabling may help.

SKM
 
Upvote 0
Is there any direct method ( as available for userform) and indirect way to do this?

Do a search for how to disable the caption buttons of a userform and follow the same technique only in this case it will work on the Application.Hwnd Property. It's the same principle ie : use the SetWindowLong with the GWL_STYLE flag to change the main window styles.

Regards.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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