+ Reply to Thread
Results 1 to 7 of 7

Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' methods

  1. #1
    Registered User
    Join Date
    08-17-2014
    Location
    Bangalore, India
    MS-Off Ver
    07
    Posts
    5

    Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' methods

    The work-sheet "celldel" code is as below. It disallows row 'insert' and 'delete' methods by using right click on the Row Number bar (left side) and then choosing either Insert or delete. The change that I want to do, is allow insert and disallow delete method.

    Thanks and best regards

    Vilas Desai

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' metho

    I pasted your code into a worksheet module, but none of it gets triggered when I delete or insert rows or columns. Am I missing something?
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Registered User
    Join Date
    08-17-2014
    Location
    Bangalore, India
    MS-Off Ver
    07
    Posts
    5

    Re: Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' metho

    OK, here is the worksheet change event code. This goes into the worksheet MasterList!

    The earlier code is a "Class Modules" code

    Regards
    Vilas Desai


    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' metho

    Ok, I pasted that code into a Class Module, and the earlier code into Sheet1, but still nothing happens when I insert or delete.

  5. #5
    Registered User
    Join Date
    08-17-2014
    Location
    Bangalore, India
    MS-Off Ver
    07
    Posts
    5

    Re: Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' metho

    Have you named the Sheet1 as MasterList -- sorry to ask this question but sometimes it is missed out as i usually do.

  6. #6
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' metho

    Yes, but it doesn't make any difference. I put debug stops in all the class module subroutines, but not of it is being run. I don't have much experience with class modules, so I'm probably doing something wrong. Sorry. Maybe someone else can help.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Modify code to Insert row in a worksheet coded to disallow 'Delete' and 'Insert' metho

    the code doesn't stop inserting or deleting-only clearing contents. not real clear what the problem is
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Insert and modify shapes - Inefficient code
    By SIMBAtheCAT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2014, 10:22 PM
  2. [SOLVED] Modify Macro to insert/delete rows based on cell value
    By Marvelous in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2013, 10:49 AM
  3. Change/Modify VB Code to Shift and not insert 2007
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2013, 11:18 AM
  4. Unable to Modify Worksheet Names, Insert
    By azkoper in forum Excel General
    Replies: 4
    Last Post: 08-14-2008, 04:21 PM
  5. [SOLVED] Modify code to insert borders
    By Phil H in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2006, 09:50 AM

Tags for this Thread

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