Hello,
Can anyone please suggest me VBA code for disabiling Back Space key and Del key in Sheet1, Cell B5 alone please?
My sincere thanks for all helps.
Thanks and regard,
gm2612
Hello,
Can anyone please suggest me VBA code for disabiling Back Space key and Del key in Sheet1, Cell B5 alone please?
My sincere thanks for all helps.
Thanks and regard,
gm2612
Do you only wish to prevent the cell being changed, or may other values be entered into the cell?
- Please remember to mark threads Solved with Thread Tools link at top of page.
- Please use code tags when posting code: [code]Place your code here[/code]
- Please read Forum Rules
Hello Izandol,
I have the cell B5 in "sheet1", which is key for an event macro. When a name of the customer is entered, if the entered name is not in the master list, the macro will create a new sheet in the name of new customer and copy paste the table from the sheet "Template". By any chance, if I press Del or use back space key to clear the cell, then the "Sheet1" itself getting changed. In order to prevent such mishaps, I would like to disable use of back space key up to the beginning of cell as well DEL key in the cell B5 only..
I have attached the xl spreadsheet for your reference. Can you please suggest any methods please?
Thanks and regards,
gm2612
to disable del and backspace key.xls
I do not have Excel available now but with Change event you may test length of B5 and undo if it is 0
[Code]if Len(range("b5").value) = 0 then
Application.undo
Else
'// code for creating sheets
End if[code]
Thank you Izandol. It is perfect now. Thanks a lot for your support.
Regards,
gm2612
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks