+ Reply to Thread
Results 1 to 4 of 4

How to leave selected columns unprotected after running a code.

  1. #1
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    How to leave selected columns unprotected after running a code.

    Hello experts
    I have 8 sheets in this workbook out of which 7 are hidden. The sheet (Original) which is not hidden is left unhidden so that each time a new data is entered in this from columns A:J. The rest of the sheet is protected and hidden. The problem is when I run the code, the cells in columns A:J are also locked at the end of the code along with the rest of the sheet. I need your expert advice to avoid the cells from locking from columns A:J after I run the code.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: How to leave selected columns unprotected after running a code.

    Format columns A to J as unlocked and protecting the sheet will still allow editing.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: How to leave selected columns unprotected after running a code.

    Bernie. I already tried that. But whenever I run the code, it will lock the cells. I am not sure why it is locking the cells. Can it be due to the placement of the code of line in the macro button.?

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: How to leave selected columns unprotected after running a code.

    I press the GenerateXML button and then the ClearData button. After that When I have to paste new data in columns A:J to generate the next XML file, the Original sheet is fully locked. Please check this video to check the hide and unhide buttons are working right. So I think there must be something wrong in the placement of the code line in the clear data macro. Can you please find the problem and help me to solve it.?
    https://drive.google.com/file/d/1uQU...ew?usp=sharing
    Last edited by RAJESH SHAH; 12-21-2021 at 12:47 AM.

+ 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. [SOLVED] Code to move selected cells to the right 2 columns
    By coach.32 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2020, 06:19 PM
  2. [SOLVED] linking columns to provide a running total in selected cell
    By Mitch.Birlea in forum Excel General
    Replies: 1
    Last Post: 06-13-2017, 10:47 AM
  3. [SOLVED] Save selected pages to desktop without running each page code?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2012, 11:56 PM
  4. Replies: 1
    Last Post: 05-07-2009, 11:49 AM
  5. [SOLVED] Re-protect if originally protected, leave unprotected if not?
    By StargateFanFromWork in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2006, 03:10 PM
  6. [SOLVED] Leave list box unprotected while protecting worksheet
    By acukid in forum Excel General
    Replies: 1
    Last Post: 09-13-2005, 02:05 PM

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