View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
NickHK[_3_] NickHK[_3_] is offline
external usenet poster
 
Posts: 415
Default Changing the value of a protected cell

Dave,
Interesting times for sure, but also Hong Kong, so not surprising really.

NickHK

"Dave Peterson"
...
Wow!

You live in interesting times.

(not meant as a Chinese curse!)

NickHK wrote:

Dave,
Thanks.
I'm currently on a Chinese system without Office installed, so it was
guesswork.

NickHK

"Dave Peterson"
...
UserInterfaceOnly = UIOnly

(just a clarification)

NickHK wrote:

Shawn,
Look at the arguments for the Protect method.
You have an option of UIOnly (or something like that). That means that
the
user cannot change the sheet, but code can.

NickHK

"Shawn"
...

Sub go()
Dim goal As Range
Set goal = Sheets("sheet1").Range("A1")

Range("A1") = goal + 1
End Sub

I get an error because this is on a protected sheet and protected
cell.
How
can I get result without having to unprotect the sheet?


--
Thanks
Shawn

--

Dave Peterson


--

Dave Peterson