+ Reply to Thread
Results 1 to 3 of 3

If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct?

  1. #1
    Marc
    Guest

    If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct?

    Marc



  2. #2
    Norman Jones
    Guest

    Re: If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct?

    Hi Marc,

    Try:

    Activesheet.Unprotect

    'Your code

    Activesheet.Protect


    ---
    Regards,
    Norman



    "Marc" <mcnr(N_O-S_P_A_M)@mindspring.com> wrote in message
    news:qqZsg.3424$vO.1052@newsread4.news.pas.earthlink.net...
    > Marc
    >
    >




  3. #3
    Mark Ivey
    Guest

    Re: If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct?

    I believe you are correct, but there are other options.

    Take for instance... you can have your macro unprotect your sheet - run your macro - and then reprotect your sheet.

    Sub MyMacro()
    Dim Password 'This line of code is optional
    Password = "1234"
    ActiveSheet.Unprotect Password

    ~~ Your macro code goes here ~~

    ActiveSheet.Protect Password, True, True, True
    End Sub

    --
    Mark Ivey
    "Marc" <mcnr(N_O-S_P_A_M)@mindspring.com> wrote in message news:qqZsg.3424$vO.1052@newsread4.news.pas.earthlink.net...
    Marc



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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