Results 1 to 4 of 4

vba to lock/protect vba

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    107

    vba to lock/protect vba

    Hello you beautiful people,

    I hope you all are keeping well.

    Excel Forum has been my go to point when I get lost so all I can do is thank you all.

    The reason I am posting today as this has got me stumped?

    I have a master workbook that creates multiple workbooks. In these workbooks there is a worksheet change timestamp.

    What I am trying to achieve is to password protect the vba from viewing/amending.

    I have never used sendkeys before and the below code isn't working for me?


    Sub Test()
    
    SendKeys "%{F11}"
    SendKeys "%TE"
    SendKeys "{TAB 9}"
    SendKeys "{RIGHT}"
    SendKeys "{TAB}"
    SendKeys " "
    SendKeys "{TAB}"
    SendKeys "craig"
    SendKeys "{TAB}"
    SendKeys "craig"
    SendKeys "{ENTER}"
    SendKeys "%{F4}"
    
    End Sub
    I can't f8 the routine so I am unsure why it isn't working as all it is doing is adding the word "craig" to the worksheet. Have I missed something?

    I know that this can be cracked via a HEX editor but these are daily spread sheets and the people it will go to won't bother.

    Is there an alternative way of locking the VBA code or can I make the above work?

    I have attached a sample workbook so you can see my issue.

    Any help will be greatly appreciated as per normal
    Attached Files Attached Files
    Last edited by Ratso; 06-04-2020 at 11:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lock and protect formulas in Excel
    By Mamyjoly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2019, 11:00 AM
  2. lock / protect excel macros
    By manekankit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2019, 03:59 PM
  3. VBA Lock and protect cells
    By mowens74 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2018, 07:53 AM
  4. protect and lock rows
    By tkraju in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2014, 11:46 PM
  5. Protect / Lock VBA Project!
    By Sherif Morsi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2012, 06:52 PM
  6. lock and protect all but certain cells
    By JediMaster in forum Excel General
    Replies: 5
    Last Post: 08-20-2010, 09:52 AM
  7. How to Lock/protect VBAproject?
    By JohnSeito in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-20-2007, 07:14 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