ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Allow user input, but not format changes (https://www.excelbanter.com/excel-programming/342705-allow-user-input-but-not-format-changes.html)

[email protected]

Allow user input, but not format changes
 
Is there a way using VB to allow user input in a cell, but not allow
them to reformat that cell?

Thanks in advance!
Laura


Dave Peterson

Allow user input, but not format changes
 
If you leave the cell unlocked (format|cells|protection tab)
then protect the worksheet (tools|protection|protect sheet)

Then you'll see that this is the usual behavior.

wrote:

Is there a way using VB to allow user input in a cell, but not allow
them to reformat that cell?

Thanks in advance!
Laura


--

Dave Peterson

[email protected]

Allow user input, but not format changes
 
That isn't what is happening. I have the worksheet locked, and the
cell unlocked. The user needs to input a 4 digit year, however, when
I'm testing and I put in a date with slashes, the field changed to be a
date field. Now, no matter what I put in that field, it changes it to
a date. Like if I type in 2005, Excel changes it to 06/27/1905.

Laura



All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com