Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default check if worksheet is protected using code

Just wondering if theres a way i can do a simple "i
Worksheets("3.Data") is protected then"

also how would i assign a value to a cell using code? i.e. say A1
"blah" ? it didnt like cells(a1)="blah" which i assumed would be th
way.

thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default check if worksheet is protected using code

Hi
For your first question try
If Worksheets("3.Data").ProtectContents = True Then
MsgBox "The contents of shet '3-data 'are
protected."
End If


Second question
use something like
Range("A1").value="text"
or
cells(1,1).value="text"

-----Original Message-----
Just wondering if theres a way i can do a simple "if
Worksheets("3.Data") is protected then"

also how would i assign a value to a cell using code?

i.e. say A1 =
"blah" ? it didnt like cells(a1)="blah" which i assumed

would be the
way.

thanks


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default check if worksheet is protected using code

ok thanks, that work

--
Message posted from http://www.ExcelForum.com

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
How to Check if Worksheet TAB is protected or Not Ananth Excel Discussion (Misc queries) 3 March 30th 09 01:08 PM
Spell check when worksheet is protected Brian Excel Discussion (Misc queries) 3 May 9th 08 01:18 AM
unprotect check box in protected worksheet Laura Bennett Excel Discussion (Misc queries) 1 September 12th 06 05:12 PM
spell check for protected worksheet for Excel 97 Jessica Excel Discussion (Misc queries) 1 March 18th 05 05:48 PM
Why doesn't spell check work on a protected worksheet? Creating Order Forms is Fun Excel Worksheet Functions 6 December 22nd 04 07:34 PM


All times are GMT +1. The time now is 10:59 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"