Consulting

Results 1 to 3 of 3

Thread: Unlocking all Excel (2007) cells by default

  1. #1

    Unlocking all Excel (2007) cells by default

    When I start Excel, by default all cells are Locked. For certain projects, the cells that I want to keep locked are relatively few and I would save time if the default setting were Unlocked. Is there a way to do this for an entire workbook, through VBA or otherwise?

    Thanks!

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,362
    Location
    Hi there,

    I believe you could just toss in a few lines of 'junk/run once and delete" code.
    Option Explicit
      
    Sub example()
    Dim wks As Worksheet
      
      For Each wks In ThisWorkbook.Worksheets
        wks.Cells.Locked = False
      Next
      
    End Sub
    Hope that helps,

    Mark

  3. #3
    VBAX Wizard
    Joined
    Apr 2007
    Posts
    6,943
    Location
    1. You could change the Normal Style to unlocked. Most times people have the Normal Style applied

    2. You could format a new 'default' template and put it in your XLstart folder. Only problem I've experienced with that you have to use Control-N and not File, New -- not sure why

    http://www.pcreview.co.uk/forums/tem...-t3889268.html



    Paul

Posting Permissions

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