Disable cell editing once the data entered

2161 views 3 replies

Respected Members,

I am developing a custom software in Microsoft Excel in 97-2003 Format. This program will determine the total and maximum running vehicle through graph. The program is completed but the thing is that, I wanted to disable a particular cell as soon as the data is entered in cell and pressed enter, means to stop the users to edit the value as soon as they press enter. So, can anyone just help me out, to solve out this querry? Any help, ideas and suggestions will be appreciated. Hope the best from your side.

Thanks in advance,

Regards,

Yuvraj Kumar, Asst. Manager (Information Technology)

Replies (3)

Try this Macro in the sheet where data is entered

 

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo MyError
 
    Selection.Locked = True
    Selection.FormulaHidden = False
       ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True 
  Exit Sub
MyError:
  
  MsgBox ("i found a culprit") ' in case somebody tries to delete the range using control+"-" then msgbox gets poppedup
  End
End Sub
        

 

Dear,

First of all thank you very much for the reply. I had attached the said file, please download it and in the column "I" which is "End, Odometer End", i want to apply restriction for the user as soon as he enters the data, and presses enter. He should not be able to delete/edit the data once entered. Waiting for a good resolution.

Thank you in advance!

 hey here is the modified file

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
24 June 2026
Senior Account (VA Client Operations)

Karbon Business

Bengaluru

CA Inter

View Details
Company
ARTICLESHIP 18 June 2026
Article Assistance

RB KESHRI & CO.

Mumbai

CA Inter

View Details
Company
29 May 2026
Company Secretary - Part time

Shaswat initial support private limited

Ahmedabad

CS

View Details
Company
ARTICLESHIP 20 June 2026
Articleship

RB KESHRI & CO

Mumbai

B.Com

View Details
Company
12 June 2026
Accounts & Taxation Executive

Winshine Financial Services

Mumbai

CA Inter

View Details
Company
Featured 15 June 2026
Senior Auditor

N. Dhawan & Co

New Delhi

CA Inter

View Details
Company
16 June 2026
Sr. Associate / Assistant Manager | TAS / FDD

Boutique Investment Bank & Transaction Advisory Firm

Gurgaon

CA

View Details
Company
ARTICLESHIP 08 June 2026
Internal & Taxation Article

O P Bagla & Co LLP

New Delhi

CA Inter

View Details