+ Reply to Thread
Results 1 to 8 of 8

VBA seems to be blocked by user passwords I installed

  1. #1
    Registered User
    Join Date
    08-16-2017
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    VBA seems to be blocked by user passwords I installed

    I'm creating this inventory worksheet for my pharmacy.

    Cells B8:D25 are accessible only by the pharmacist with the password "Bruce".

    Cells E8:G25 will be where the technicians enter data.

    I'm trying a VBA that is supposed to lock the cell after the technician enters a value.

    The code works on a brand new worksheet, but with my worksheet I think my various protections are somehow interfering with the code.

    I have attached my worksheet to this post.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA seems to be blocked by user passwords I installed

    Hello y38m38,

    Welcome to the Forum!

    Your Code is checking for a Value and not an image or Picture, in your Specified range, that is why it is not working.

    Delete the images and enter the Value of 14, or any other Value like B0025 in those Cells, and see how nice your Code works.!

    Regards.
    Last edited by Winon; 08-16-2017 at 10:59 AM.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    08-16-2017
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    VBA seems to be blocked by user passwords I installed

    Thank you Winon,

    I removed the images inserted by my date picker and it worked! (see Demo-Fixed) Thank you.

    Now I have expanded to Demo2 with no images and the code is not working anymore (on Sheet 1 (Adderall XR 20mg)).

    I used Find & Select and couldn't find any images on any sheets.

    I only inserted the code on Sheet 1 (Adderall XR 20mg) and E8:G25 is the data entry area.

    Hope you or someone can help

    Thank you.
    Attached Files Attached Files

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA seems to be blocked by user passwords I installed

    Hi y38m38,

    Thank you for your response, but please do not test my temper! LOL

    Your sample Workbook Demo 2 boasts a Workbook Protection, which renders any help from my side futile.

    Please could you upload said Workbook again, without Workbook Protection?

    Pretty please?

    O.K. then, I shall wait for your feedback!

    Kind regards,

  5. #5
    Registered User
    Join Date
    08-16-2017
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    VBA seems to be blocked by user passwords I installed

    My apologizes Winton,

    I have disabled the workbook protection.

    I hope you can help again.

    Thank you
    Attached Files Attached Files

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA seems to be blocked by user passwords I installed

    Thank you y38m38,

    You have not only removed Workbook Protection, but you have also changed Sheets1 and 2 around, thereby solving your own problem. Congratulations!

    The VBA Code now refers to the correct Sheet.

    Regards.

  7. #7
    Registered User
    Join Date
    08-16-2017
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VBA seems to be blocked by user passwords I installed

    Thank you Winon,

    I think I'm all set from here and I learned a lot.

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA seems to be blocked by user passwords I installed

    You are welcome y38m38,

    You are a fast learner. Thanks for the Rep+, I appreciate it!

    You also set a good example for new Forum Members to respond in the way you do, And by marking this Thread as 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. Excel vba code for multi user logins and passwords
    By Willow350 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2016, 10:26 PM
  2. User Passwords to view specific sheets
    By kevdas in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-24-2015, 07:35 AM
  3. [SOLVED] User and passwords
    By Khail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2013, 08:32 AM
  4. Excel query opens database when its blocked by another user
    By grimfandango in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2013, 07:32 AM
  5. Multiple User Passwords for a Workbook???
    By draco102000 in forum Excel General
    Replies: 8
    Last Post: 04-02-2012, 02:20 PM
  6. Multi-User Passwords
    By gparkins in forum Excel General
    Replies: 2
    Last Post: 03-15-2006, 11:55 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