+ Reply to Thread
Results 1 to 3 of 3

User permissions for ranges

  1. #1
    dalbin
    Guest

    User permissions for ranges

    Is there any way, programmatically, to set user permissions for a range?

    Basically, I want to use the functionality that exists when I go to:

    Tools / Protection / Allow Users to Edit Ranges ...
    Then, when I click on the "Permissions" Button, I can add a user or group.

    The assigned user or group then has permissions to modify the range without
    a password.

    Thank you, in advance, for your help.

  2. #2
    Chip Pearson
    Guest

    Re: User permissions for ranges

    Turn on the macro recorder (Tools menu, Macro, Record new macro)
    while you set permissions, and you'll see the code to do what you
    want.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "dalbin" <[email protected]> wrote in message
    news:[email protected]...
    > Is there any way, programmatically, to set user permissions for
    > a range?
    >
    > Basically, I want to use the functionality that exists when I
    > go to:
    >
    > Tools / Protection / Allow Users to Edit Ranges ...
    > Then, when I click on the "Permissions" Button, I can add a
    > user or group.
    >
    > The assigned user or group then has permissions to modify the
    > range without
    > a password.
    >
    > Thank you, in advance, for your help.




  3. #3
    dalbin
    Guest

    Re: User permissions for ranges

    Thank you for your input.

    Actually, though, that was the first thing I tried before making this
    posting. It didn't record anything pertinent. I believe the commands are
    nested too far into the Excel dialog boxes, that the recorder does not record
    what I am setting.

    Here is what it recorded:

    Sub ProtectSheetsMacro()
    ActiveSheet.Protection.AllowEditRanges.Add Title:="Testing",
    Range:=Cells, _
    Password:="tennis"
    End Sub

    Please reply with any other ideas.

    "Chip Pearson" wrote:

    > Turn on the macro recorder (Tools menu, Macro, Record new macro)
    > while you set permissions, and you'll see the code to do what you
    > want.
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    > "dalbin" <[email protected]> wrote in message
    > news:[email protected]...
    > > Is there any way, programmatically, to set user permissions for
    > > a range?
    > >
    > > Basically, I want to use the functionality that exists when I
    > > go to:
    > >
    > > Tools / Protection / Allow Users to Edit Ranges ...
    > > Then, when I click on the "Permissions" Button, I can add a
    > > user or group.
    > >
    > > The assigned user or group then has permissions to modify the
    > > range without
    > > a password.
    > >
    > > Thank you, in advance, for your help.

    >
    >
    >


+ 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