ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format Cells (https://www.excelbanter.com/excel-programming/307656-format-cells.html)

jdy

Format Cells
 
I have an excel file that I use as an quote form. I would
like to be able to disable all cells that are not used in
the form so that when the user clicks on these cells, the
cells are not highlighted. Is there a way to do this?
Thanks for the help.

Tom Ogilvy

Format Cells
 
by default, the locked setting for all cells is locked.

Select the cells you want editable, and then do format=Cells go to the
protection tab and uncheck locked.

Now go to tools=protection=Protect worksheet and protect the worksheet.

now in your workbook_open event put in code like

Thisworkbook.worksheets("Sheet1").enableSelection = xlUnlockedCells

This setting is non-persistent, so if you close and open the workbook, you
need to reset it - thus why it is put in the workbook_open event.

If the user disables macros, then this setting won't be made, but the cells
will be selectable but not editable since the worksheet is protected.

Recognize that any such password protection in Excel is easily defeated.

--
Regards,
Tom Ogilvy


"jdy" wrote in message
...
I have an excel file that I use as an quote form. I would
like to be able to disable all cells that are not used in
the form so that when the user clicks on these cells, the
cells are not highlighted. Is there a way to do this?
Thanks for the help.




JK

Format Cells
 
It sounds like you simply need to lock the unused cells and protect the
sheet. This will allow the user to tab through the form and select only the
cells you want entered.

Jim Kobzeff
"jdy" wrote in message
...
I have an excel file that I use as an quote form. I would
like to be able to disable all cells that are not used in
the form so that when the user clicks on these cells, the
cells are not highlighted. Is there a way to do this?
Thanks for the help.





All times are GMT +1. The time now is 02:22 AM.

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