+ Reply to Thread
Results 1 to 8 of 8

Disable/Hide Insert and Delete Row/Column Functions

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Fall River MA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Question Disable/Hide Insert and Delete Row/Column Functions

    Hi guys,

    I am working on a project tracking template for multiple workers. I created a macro to insert a range above a selected row (with all formulas inserted as well).

    What I need to do is block end users from being able to insert and delete rows and/or columns. What VBA code or macro should I use to accomplish this?

  2. #2
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Disable/Hide Insert and Delete Row/Column Functions

    SeanPratt,

    Would locking the sheets be an option? You can use VBA to lock the sheet so that everything still works other than inserting or deleting rows and columns. As you need the sheet unprotected for your code to run you can unlock the sheet, run your code and then lock the sheet.

    The code to unlock the sheet before your existing code would be;
    Please Login or Register  to view this content.
    The code to lock the sheet after your existing code would be;
    Please Login or Register  to view this content.
    Mowgli

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Fall River MA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Disable/Hide Insert and Delete Row/Column Functions

    If I lock the sheets, will end users need to unlock them to up required fields (activty, project, hours)?

  4. #4
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Disable/Hide Insert and Delete Row/Column Functions

    Normally yes, however ...

    Select all cells in the sheet (right-click on the area to the left of ColumnA and above Row1)
    Go to "Format Cells" and then go to the "Protection" tab
    Ensure that the checkbox "Locked" is UNCHECKED

    Users will be able to work away when the sheet is locked without being much the wiser... unless they try to insert or delete rows or columns

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Fall River MA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Disable/Hide Insert and Delete Row/Column Functions

    Excellent. Thank you

  6. #6
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Disable/Hide Insert and Delete Row/Column Functions

    Let me know if it does what you want or if it is not suitable

  7. #7
    Registered User
    Join Date
    10-15-2012
    Location
    Fall River MA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Disable/Hide Insert and Delete Row/Column Functions

    Works great.

    Thanks

  8. #8
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Disable/Hide Insert and Delete Row/Column Functions

    Don't forget to mark your thread solved if you are happy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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