Lock a Cell after Data Entry using VBA Excel with Message Box Notification before Locking

Поділитися
Вставка
  • Опубліковано 5 лис 2024

КОМЕНТАРІ • 25

  • @nileshtikekar3235
    @nileshtikekar3235 6 років тому

    Thank you very much Dr. Todd Grande. It's very useful. And the way you teach is very good. Once again thank you.

    • @nileshtikekar3235
      @nileshtikekar3235 6 років тому

      Thanks Sir, Will you please help me out? I want a vba that finds the missing words in 2 strings in excel. Can you help me out sir? Thanks in advance. Please reply. The scenario is that if I want to type from a given string and if I missed to type any word, I need to count such words. So will u please help me?

  • @Singh-hum
    @Singh-hum 5 років тому +1

    Thanks a lot for simplifying the thing..It really very helpful for me.. i got what i looking for...Thanks again.. Hope some more videos on small topics you will be uploading in future...Thumbs up...

  • @anemandanna
    @anemandanna 5 років тому +1

    Thanks Dr Todd for the tutorial.
    I want to apply auto protecting/locking feature when user is entering the data in a specific cell range while the user is still able to change the data outside the specific range in the same sheet. (for example, user cannot modify the data once he enters data in the range from "IP21:ABK2500", but the user still can able to change the data outside this range such as in columns A to AO)
    I have modifeid your code as below, but it does not work selectively for my range.
    Appreciate your help on this.
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cl As Range
    ActiveSheet.Unprotect Password:="1986"
    Set cl = Intersect(Range("IP21,ABK2500"), Target)
    For Each cl In Target
    If cl.Value "" Then
    check = MsgBox("is this entry correct? This entry cannot be edited after entering the value", vbYesNo, "Cell Lock Notification")

    If check = vbYes Then

    cl.Locked = True

    Else
    cl.Value = ""
    End If

    End If
    ActiveSheet.Protect Password:="1986", AllowFiltering:=True, AllowSorting:=True
    Next cl
    End Sub

  • @markarvin7725
    @markarvin7725 5 років тому

    This is just what I have been looking for. Thank you!

  • @igumguitara5353
    @igumguitara5353 4 роки тому

    Thank u for the lesson sir..
    Would you help me sir.. I have a little question still in this same case. How to make this work when we click yes so it will be used in a couple cell... for example i have 4 entry data long, so if i used your code the notification will be show up in each cell to corrected... thank you sir.

  • @matq5691
    @matq5691 4 роки тому

    Is it possible to specify a range of cells to apply this program to? I.e. I only want Column A to have a entry confirmation and lock. what would need to be changed to this code to apply that? Excellent video, by the way! It was simple, precise, and easy to understand! 5/5 stars

  • @yvonnehuang9925
    @yvonnehuang9925 7 років тому +1

    Sorry for this silly question. If I am looking to only lock certain cells (not in consecutive row or column), what would the code look like? Thank you.

  • @kgv990
    @kgv990 6 років тому

    Hi Grande, Now it is working fine when I am enable the macro to the file. it is working fine, thanks a lot.

  • @unclephoto6639
    @unclephoto6639 6 років тому

    Thanks Dr. Grande, it is possible to please do the same video for google sheets?

  • @amitprakashgupta2429
    @amitprakashgupta2429 6 років тому

    Sir, its really good ...working superb!! now could you please add the password in this code so anybody couldn't unprotect the cell from unprotect sheet tab ...!!Thanx in advance.

  • @21primetimesstill
    @21primetimesstill Рік тому

    I dont understand why when i close the file, the macros and protections disappear.

  • @Mr.WS6
    @Mr.WS6 5 років тому

    So when I type in data to cell, I click out the cell, message box pops up, I click yes, then my issue arises...says error 1004 unable to set locked property of range class. Wont lock the data put in the cell. Same thing pops up if I click no on are you sure box.

  • @kgv990
    @kgv990 6 років тому

    I try to use the same formula for my debtors agewise analysis statement but it is not working, please help me

  • @laurendean9920
    @laurendean9920 7 років тому

    after hours and hours I think I have finally found my answer

  • @apache5786
    @apache5786 7 років тому

    I am unable to share this excel VBA file on SharePoint for Multiple users can update their details
    Please help....!!!

  • @smitw7706
    @smitw7706 6 років тому

    Dhanyavad Sir.

  • @hemantgoyal1357
    @hemantgoyal1357 6 років тому

    Sir how to filter participants and add data

  • @MohAboAbdo
    @MohAboAbdo 6 років тому

    Thanks ... Thanks

  • @oluseyiotukoya7488
    @oluseyiotukoya7488 6 років тому

    hi How would i lock the entire row after entering data in a specific cell on that row

  • @AbhishekMishra-cr1tz
    @AbhishekMishra-cr1tz 5 років тому

    Display problem

  • @pbtechpro
    @pbtechpro 6 років тому

    video not clear