Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Delete

  1. #1
    Guest

    Default

    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. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    Guest

    Default

    Thanks Dave it works great.

  4. #4
    New Member
    Join Date
    Jul 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Re: Delete

    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. #5
    New Member
    Join Date
    Apr 2009
    Location
    Nairobi, Kenya
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default 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.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •