+ Reply to Thread
Results 1 to 2 of 2

Can a macro work in a protected [Excel 2010] sheet?

  1. #1
    Registered User
    Join Date
    06-15-2011
    Location
    Atlanta, GA
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Can a macro work in a protected [Excel 2010] sheet?

    I am a records manager and I've created an Excel 2010 form for my users to complete when they are sending boxes of business records (paper) to offsite storage. I've created a macro via a commandbutton on the form that they can click to insert a new row each time they want to add a box (one row on the form equals one box of records, so 10 rows = 10 boxes). While the macro works really well when the sheet is not protected, it does not work when the sheet is protected.

    How can I get around this... is there something I'm missing?

    Here's my VBA code:

    Private Sub CommandButton1_Click()

    Sheets("RTL Form").Range("a13").Select
    ActiveCell.EntireRow.Insert Shift:=xlDown

    Sheets("RTL Form").Range("b13:G13").Select
    Selection.Borders.Weight = xlThin

    End Sub

    Thanks.
    Earl

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Can a macro work in a protected [Excel 2010] sheet?

    You'd need something like:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. MAcro does not work when certain cells in a work sheet are protected
    By Unnati in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 03:38 AM
  2. Macro does not work when sheet is protected??
    By savethisid in forum Excel General
    Replies: 1
    Last Post: 04-06-2012, 07:01 AM
  3. protected sheet, allow for macro to work
    By jw01 in forum Excel General
    Replies: 2
    Last Post: 08-22-2011, 02:55 PM
  4. Macro will not work when sheet is Protected
    By alachape in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2008, 03:13 PM
  5. Replies: 2
    Last Post: 07-11-2006, 11:15 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