Forum Discussion

Marcelo Magri's avatar
Marcelo Magri
Copper Contributor
Nov 26, 2023

Making certain cells only changeable through double click

Hello everyone,

 

I'm facing a problem for which I have no idea how to solve: I have the following Excel sheet:

 

 

The cells are filled with the X by double clicking them. If I choose one cell, the others are filled with blank. What I'd like to achieve is, for those columns, to disable, or intercept and ignore, the keyboard. People have been typing values, and so it gets messy data in the end.

Is there any way of achieving it?

 

Thanks in advance,

Marcelo

2 Replies

  • Marcelo Magri 

    Just some thoughts, as I haven't written VBA for a number of years now.

    If the selection contents were written to a globally defined variable on selection change, the values could be written back to the target once the user has changed its contents.  Care would be needed to ensure that the event handlers are not enabled when the contents are replaced.

  • Marcelo Magri 

    Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?

Resources