![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
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 ! |
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks Dave it works great.
|
|
|
|
#4 |
|
New Member
Join Date: Jul 2009
Posts: 1
|
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 |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2009
Location: Nairobi, Kenya
Posts: 9
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|