Delete

G

Guest

Guest
I read the message board with interest and tried the code

Private Sub Worksheet_Activate()
ID = 847
For Each CB In Application.CommandBars
Set C = CB.FindControl(ID:=ID, recursive:=True)
If Not C Is Nothing Then C.Enabled = False
Next
End Sub

Which greys out the 'Delete Sheet' option and works well. Trouble is, it seems to have permanently greyed the 'Delete Sheet' option. I have deleted the code from the spreadsheet where I put it, to no effect, how do I get back the Delete Sheet' option - help !
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Sure! In the same Private Module of the Sheet Object put:

Private Sub Worksheet_Deactivate()
ID = 847
For Each CB In Application.CommandBars
Set C = CB.FindControl(ID:=ID, recursive:=True)
If Not C Is Nothing Then C.Enabled = True
Next
End Sub
 
Upvote 0
Hi Fnds,

I copied the following code as is to get back the Delete Sheet' option
in the same workbook sheet called 'iCAT" but still I am not able to delete sheets form the 'iCAT" workbook as well as from other workbooks too.

Even I deleted entire code form "iCAT" workbook and then opened a new workbook and copied the code to get back the delete sheet option still failed to delete any of the sheets.

When deleting a sheet it telling "Prevent_Delete_sheet" ( then name i gave to my macro ) is not found.

Please help me to get rid off this very big problem


Private Sub Worksheet_Deactivate()
ID = 847
For Each CB In Application.CommandBars
Set C = CB.FindControl(ID:=ID, recursive:=True)
If Not C Is Nothing Then C.Enabled = True
Next
End Sub
 
Upvote 0
Re: Doing a X and Y axis Chart

I run reports in Oracle Sales Analyzer and would like to do a linear graph that compares Volume growth(X-axis) against Value growth(Y-axis). The insert Chart or the PivotChart excel options is not allowing me this, is there a way I can achieve this?

Thank you for taking your time to read this and contemplate on it.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

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