+ Reply to Thread
Results 1 to 5 of 5

VBA to change range that users are allowed to edit

  1. #1
    Forum Contributor
    Join Date
    08-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    119

    VBA to change range that users are allowed to edit

    Is it possible to use VBA to change the range that users are allowed to edit?

    I have a sheet with a list that is sortable by users when the sheet is protected, however they cannot change the values on the list. I did this by clicking on the button that says "Allow Users To Edit Ranges" then entering the range of the list that I want to them to be able to sort.

    I want a code that will change that range based on some other criteria. I tried to record a macro of myself changing the range, but it just gave me an empty sub. Is there a way to do this? The code would hypothetically go like this:

    Please Login or Register  to view this content.
    Any help on this, or suggestions on how to do this another way would be appreciated. I tried defining the range with a formula, but that only works once, as it converts the formula to a static range.

    Thanks,
    Chad

  2. #2
    Forum Contributor
    Join Date
    08-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    119

    Re: VBA to change range that users are allowed to edit

    Nevermind,
    I figured it out. Just have to delete the range, then add a new one

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: VBA to change range that users are allowed to edit

    Or, simply...

    Please Login or Register  to view this content.
    Actually, let's make that...

    Please Login or Register  to view this content.
    Hope this helps!
    Last edited by Domenic; 07-03-2014 at 04:19 PM. Reason: Added an alternative...

  4. #4
    Forum Contributor
    Join Date
    08-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    119

    Re: VBA to change range that users are allowed to edit

    That does help, thanks!!

  5. #5
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: VBA to change range that users are allowed to edit

    You're very welcome!

+ 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. allow users to edit range
    By Crasher in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2007, 07:29 PM
  2. [SOLVED] Allow users to edit range ERROR
    By [email protected] in forum Excel General
    Replies: 4
    Last Post: 06-29-2006, 02:55 AM
  3. [SOLVED] allow users to edit range
    By Lp12 in forum Excel General
    Replies: 0
    Last Post: 03-21-2006, 08:25 AM
  4. allow users to edit a range in excel 2000
    By jimar in forum Excel General
    Replies: 6
    Last Post: 08-24-2005, 04:05 PM
  5. Allow users to edit range query
    By manxshaun in forum Excel General
    Replies: 7
    Last Post: 04-15-2005, 07:07 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