+ Reply to Thread
Results 1 to 12 of 12

check box to lock cells, date stamp and hide itself after checking

  1. #1
    Registered User
    Join Date
    11-16-2010
    Location
    reading,england
    MS-Off Ver
    Excel 2010
    Posts
    14

    check box to lock cells, date stamp and hide itself after checking

    Dear All, I have a particular worksheet with a check box which a user should check to confirm various selections made above. On checking I would like 3 things to happen.
    1. Cells F7:F13 (containing outputs from combo boxes) become locked.
    2. A date stamp is placed in cell I13.
    3. Ideally the checkbox hides itself or locks itself.

    I am using Excel2010. The Worksheet will be protected and the cells referred to are in columns which are hidden from the user.

    Many thanks for any help.
    Last edited by niks; 11-16-2010 at 10:28 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: check box to lock cells, date stamp and hide itself after checking

    What kind of Checkbox, can you attach an example workbook?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-16-2010
    Location
    reading,england
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: check box to lock cells, date stamp and hide itself after checking

    Hi RoyUK... that was quick!

    Currently its a check box that I took from Developer-Insert-Form Control... but it could actually be anything. The point is just that the user checks something to confirm his choices made elsewhere... which cannot subsequently be changed. The date of doing this also needs to be stamped.

    Hope that makes it clearer !

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: check box to lock cells, date stamp and hide itself after checking

    This for the controls checkbox

    Please Login or Register  to view this content.
    Last edited by davesexcel; 11-16-2010 at 09:09 AM.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: check box to lock cells, date stamp and hide itself after checking

    Is there just the one checkbox or many?

  6. #6
    Registered User
    Join Date
    11-16-2010
    Location
    reading,england
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: check box to lock cells, date stamp and hide itself after checking

    Thanks DavesExcel... but unfortunately it doesnt seem to work. On checking the box i get the message "Invalid Use of ME keyword".... any suggestions?

  7. #7
    Registered User
    Join Date
    11-16-2010
    Location
    reading,england
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: check box to lock cells, date stamp and hide itself after checking

    Just one check box is involved here but the sheet has other check boxes elsewhere

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: check box to lock cells, date stamp and hide itself after checking

    Where's the code? If it is not in the Sheet module then change the Me to ActiveSheet or the sheet it is running on e.g
    Please Login or Register  to view this content.

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: check box to lock cells, date stamp and hide itself after checking

    The previous code was for the Controls,
    This should work for the Forms Checkbox
    Please Login or Register  to view this content.
    You may have difficulty unchecking the box though

  10. #10
    Registered User
    Join Date
    11-16-2010
    Location
    reading,england
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: check box to lock cells, date stamp and hide itself after checking

    Hi guys... I am afraid that I still cant get this to work.... I must point out that I am new to VBA.. ... The original code was in the sheet module (at least viewing the code on the sheet revealed that ).... Changing the code to ActiveSheet now produces a different error..Runtime error 438..object doesnt support this property or method...

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: check box to lock cells, date stamp and hide itself after checking

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  12. #12
    Registered User
    Join Date
    11-16-2010
    Location
    reading,england
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: check box to lock cells, date stamp and hide itself after checking

    Many thanks Guys.... now it works perfectly after a few wobblies my end
    Last edited by niks; 11-16-2010 at 10:27 AM. Reason: Solved Thank You

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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