+ Reply to Thread
Results 1 to 3 of 3

Limit (working of) macro to a specified cell range

  1. #1
    Registered User
    Join Date
    08-23-2016
    Location
    Slovenia
    MS-Off Ver
    2010
    Posts
    9

    Limit (working of) macro to a specified cell range

    Hi there,

    this code inserts a date and the username into the pre-selected (unlocked) cell. If there is something already in that cell, it inserts a line below rather then overwriting it.
    If by any chance he clicks onto a locked cell and runs the macro, it will not work due to the locked cell feature (an elegant way around the debug mode is the "On Error GoTo")

    Please Login or Register  to view this content.
    But to avoid letting users click on other cells, which are unlocked but meant for other information input, I would like to limit working of that macro to just a range of cells, e.g. B10:B50.
    So, if you click within the range, the macro works, otherwise it does nothing.

    Thanks for the help.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Limit (working of) macro to a specified cell range

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    08-23-2016
    Location
    Slovenia
    MS-Off Ver
    2010
    Posts
    9

    Re: Limit (working of) macro to a specified cell range

    Quote Originally Posted by Olly View Post
    Try:
    Please Login or Register  to view this content.
    Hey Olly,
    thank you very much.
    Exactly what I wanted, works perfectly.

    Consider this SOLVED

    Regards

+ 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. [SOLVED] Limit a Cell To a Max Value (No list or Macro)
    By Hanru in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-19-2016, 02:03 PM
  2. [SOLVED] edit a macro that will limit the range of cells being copied in the email body
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-16-2013, 10:45 AM
  3. Replies: 1
    Last Post: 04-13-2013, 05:19 AM
  4. Working around Excel 97 limit of 7 nested IFs.
    By BoulderBill in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-01-2007, 08:40 AM
  5. Replies: 2
    Last Post: 04-26-2006, 04:40 AM
  6. How to limit 'calculate' (F9) to specific cell, range, sheets, workbooks?
    By pm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2006, 04:55 PM
  7. Object sheet name and scroll limit not working.
    By HuggyBear in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2005, 12:40 PM

Tags for this Thread

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