+ Reply to Thread
Results 1 to 5 of 5

How to lock couple of columns using macro coding...????

  1. #1
    Registered User
    Join Date
    06-05-2012
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question How to lock couple of columns using macro coding...????

    Hi,

    I have prepared a time sheet. It contains 2 columns start and end time, I need to lock these 2 columns so that no one can edit them. but once I protect the sheet the start time and end time macro stop functioning. As when I remove protection then again they start functioning.

    I need to lock the last 3 cell through VB coding so that no one can edit them and macro also function smoothly and capture time but not allow the user to make changes in those 3 columns. Please help asap.

  2. #2
    Forum Contributor
    Join Date
    06-09-2011
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    193

    Re: How to lock couple of columns using macro coding...????

    Hi Pankaj,

    just change your macro to:

    Please Login or Register  to view this content.
    This will unprotect the sheet at the beginning of the macro and protect it at the end again.
    Additionally I have added a logic to prevent the macro from entering any data into other columns than g and H.
    I have entered the macro into your file (and adjusted the protection). If you neeed to change anything, the current password is "YourPassword" (without quotes)

    Hope this helps

    Theo
    ________
    Please do not forget to close the thread once your issue is solved. Thank those who helped you by clicking the little star to the left of your helpers reply!

    Hope this helps

  3. #3
    Registered User
    Join Date
    06-05-2012
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to lock couple of columns using macro coding...????

    Hi Fettertiger,

    Yes its working If in case I face any issue I would get back to you for the same.

    thanks for the help,,,,Hope you do not mine helping me again if required....

    Thanks a ton!!!

  4. #4
    Registered User
    Join Date
    06-05-2012
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    Want to automate my manual work.....

    Hi Fettertiger,

    I have an another query for you hope you resolve the same to the earliest.

    There are two excel sheet attached to this. The first one is outstanding and the second is Sap entries.
    The items in outstanding are to be reconciled or matched off with sap entries. Some of the sap entries are sum of two or more outstanding entries.
    The sap data gets updated or changes on daily basis.
    I want that once the sap data is entered in to column G. It automatically reconcile or get matched off with outstanding entries or the color and font for the entries which are been matched of with outstanding gets changed and turns to green and which are not matched remain in red.
    For some entries in outstanding there is a consolidated sum of entry in sap, so it should automatically calculate the sum of entries in outstanding and match of with the consolidated amount in sap entries as the logic always remain the same.(explained in excel file attached).

    Hope you may help me to resolve this as this would definetly save a large amount of time in manually matching single single entry with sap.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-05-2012
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to lock couple of columns using macro coding...????

    Also I am unable to post through a new thread...I am unable to find the option to write a new thread also the attachment option is also not visible while I am writing to some one..Kindly assist...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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