+ Reply to Thread
Results 1 to 3 of 3

VBA novice needs help with .Locked on a sheet

  1. #1
    Registered User
    Join Date
    12-22-2020
    Location
    Mount Vernon, Ohio, USA
    MS-Off Ver
    Office 365 Click-to-Run (Subscription)
    Posts
    2

    Exclamation VBA novice needs help with .Locked on a sheet

    Hi all,

    I have a worksheet that is a daily record of scratch-off lottery tickets sold. I need to be able to restrict entry to the current day to reduce data entry errors. The sheet knows what date/day of the week it is and I set up a VBA macro to query that cell and set .Locked to false for only that day.

    I protect the entire sheet at the beginning of the macro but, even though it seems to be correct, none of the cells are protected.

    There are two cells defined as not Locked, in addition to the days' input. Those are a date field and a reset Yes/No

    Please, any help??

    TheOldPuterMan
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: VBA novice needs help with .Locked on a sheet

    This line of code
    Please Login or Register  to view this content.
    at the top of you macro should be
    Please Login or Register  to view this content.
    I'm not sure what you are trying to do. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: VBA novice needs help with .Locked on a sheet

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit any changes to your worksheet layout.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 01-07-2020, 02:33 AM
  2. Locked sheet
    By Sionach in forum Excel General
    Replies: 3
    Last Post: 10-27-2016, 10:04 AM
  3. [SOLVED] Taking over a spread sheet with a macro not working, (I'm just a novice with VBA)
    By 57bell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2014, 07:01 PM
  4. to HELP! Novice Excel VBAMove Entre Row into another Sheet
    By astraldreamer in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-13-2013, 08:14 PM
  5. Locked sheet
    By dlman in forum Excel General
    Replies: 2
    Last Post: 09-25-2012, 12:18 PM
  6. Locked worksheet based upon date and locked columns when worksheet is not locked
    By ruralbrew in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2011, 05:18 PM
  7. Locked sheet
    By Darin Kramer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-25-2005, 06:07 AM

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