Results 1 to 11 of 11

Disabled "Delete" for one workbook turned out to be applied to every workbook...

Threaded View

  1. #1
    Registered User
    Join Date
    06-27-2009
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    10

    Exclamation Disabled "Delete" for one workbook turned out to be applied to every workbook...

    Good morning everyone ,

    I had coffee yesterday evening and could not sleep early so I worked on some spreadsheets...

    I wanted to disable the function "Delete" when right-clicking on worksheets.

    I copy paste the following VBA code in every sheet code :


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim CommBarTmp, Commbar As CommandBar
    
    For Each Commbar In Application.CommandBars
        Set CommBarTmp = Commbar.FindControl(ID:=847, recursive:=True)
        If Not CommBarTmp Is Nothing Then CommBarTmp.Enabled = False
    Next
    End Sub
    It worked fine. Then I opened another project workbook to work on it and guess what, the function delete was also disabled !

    So I went back to the previous workbook and deleted from every sheet code the previous code. But it did not work and for every Excel workbook I opened, when I right-clicked on a sheet, the function "delete" is disabled...

    so here I am, panicking, I really don't know what to do. So I am here this morning and last night sleep didn't help me to solve this problem.

    Does anyone have a clue to help me ? Do you think an uninstall and new install might solve this problem ??

    I am really helpless

    Susie
    Last edited by susie86; 07-13-2009 at 04:31 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1