Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default locked cells and code

If cells are 'locked' I have found that data which is supposed to be
inserted by code isn't.
Is there a way around this?
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default locked cells and code

The code needs to unprotect the worksheet before updating the cells and, if
required, protect the worksheet after updating the cells.

Jock wrote:
If cells are 'locked' I have found that data which is supposed to be
inserted by code isn't.
Is there a way around this?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200708/1

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default locked cells and code

Thanks to Trevor & Mike
--
Traa Dy Liooar

Jock


"Trevor via OfficeKB.com" wrote:

The code needs to unprotect the worksheet before updating the cells and, if
required, protect the worksheet after updating the cells.

Jock wrote:
If cells are 'locked' I have found that data which is supposed to be
inserted by code isn't.
Is there a way around this?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200708/1


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default locked cells and code

Jock,

Unprotect make you changes and then reprotect at runtime

Sub standard()
ActiveSheet.Unprotect Password:="Mypass"
'Make your changes
ActiveSheet.protect Password:="Mypass"
End Sub

Mike

"Jock" wrote:

If cells are 'locked' I have found that data which is supposed to be
inserted by code isn't.
Is there a way around this?
--
Traa Dy Liooar

Jock

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
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Excel Discussion (Misc queries) 1 July 10th 09 09:42 PM
Put comments on a locked spreadsheet even though cells not locked RDP Excel Worksheet Functions 1 September 11th 05 11:59 PM
I want the macros to be locked up when cells are locked up. Ed Excel Programming 6 February 20th 05 01:31 AM
need code for disable selection of locked cells David Lewis[_3_] Excel Programming 4 January 10th 05 04:09 PM
Locked workstation breaks code? Scott Stonehouse Excel Programming 0 June 8th 04 06:22 PM


All times are GMT +1. The time now is 03:07 PM.

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

About Us

"It's about Microsoft Excel"