Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locking Specific Cells
Hey i have an interesting situation. I need certain cells in my file
to be protected while others are manipulated. Now normally we would do this by going in to the cell formatting and clicking the lock cell button then protecting the file. However, this doesn't work for my situation. The reason is because I have a macro running in the back of the program that is running so that when data is imported in these cells the column width adjusts to the right size. I cannot remove this feature because it needs to fit on one page....all i am looking for is a way to lock a range of cells from text editing. Any help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locking Specific Cells
look at the UserInterFaceOnly property of the protect method (in Excel vba
help). This must be set each time the workbook is opened and must be set with code. Then your code can work while the sheet remains protected. -- Regards, Tom Ogilvy wrote in message oups.com... Hey i have an interesting situation. I need certain cells in my file to be protected while others are manipulated. Now normally we would do this by going in to the cell formatting and clicking the lock cell button then protecting the file. However, this doesn't work for my situation. The reason is because I have a macro running in the back of the program that is running so that when data is imported in these cells the column width adjusts to the right size. I cannot remove this feature because it needs to fit on one page....all i am looking for is a way to lock a range of cells from text editing. Any help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locking Specific Cells
Of course another option is to have your code unprotect the sheet, set the
column width, protect the sheet. -- Regards, Tom Ogilvy wrote in message oups.com... Hey i have an interesting situation. I need certain cells in my file to be protected while others are manipulated. Now normally we would do this by going in to the cell formatting and clicking the lock cell button then protecting the file. However, this doesn't work for my situation. The reason is because I have a macro running in the back of the program that is running so that when data is imported in these cells the column width adjusts to the right size. I cannot remove this feature because it needs to fit on one page....all i am looking for is a way to lock a range of cells from text editing. Any help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Locking Specific Cells
you could use text validation on the cells you do not want entered and set it
not allow entrys more than 0 characters or put in your macro ,,,, password.unprotect to unprotect the sheet whilst the macro is running and password.protect at the end of your macro to re protect your sheet " wrote: Hey i have an interesting situation. I need certain cells in my file to be protected while others are manipulated. Now normally we would do this by going in to the cell formatting and clicking the lock cell button then protecting the file. However, this doesn't work for my situation. The reason is because I have a macro running in the back of the program that is running so that when data is imported in these cells the column width adjusts to the right size. I cannot remove this feature because it needs to fit on one page....all i am looking for is a way to lock a range of cells from text editing. Any help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locking combo box into a specific cell? | Excel Worksheet Functions | |||
trouble locking specific cells | Excel Worksheet Functions | |||
Locking specific cells in a workbook | Excel Discussion (Misc queries) | |||
locking formula in cells in without locking whole sheet | Excel Discussion (Misc queries) | |||
Unlocking and locking a specific cell | Excel Programming |