Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking combo box into a specific cell? driscolp Excel Worksheet Functions 0 January 18th 09 04:35 PM
trouble locking specific cells [email protected] Excel Worksheet Functions 2 June 19th 07 05:14 PM
Locking specific cells in a workbook Sarah Excel Discussion (Misc queries) 2 April 17th 07 03:16 AM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
Unlocking and locking a specific cell Reggie Excel Programming 2 December 22nd 05 12:39 AM


All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"