Determine if a sheet is protected?

How can I determine if a sheet is protected or not?

thank u

1/18/2010 11:28:18 PM
excel.programming 6508 articles. 2 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 37





"Robert Crandal" <> wrote in message 
> How can I determine if a sheet is protected or not?
> thank u

1/18/2010 11:55:36 PM
Sub test()

MsgBox ActiveSheet.ProtectionMode   'returns true or false

End Sub

Gord Dibben  MS Excel MVP

On Mon, 18 Jan 2010 16:28:18 -0700, "Robert Crandal" <>

>How can I determine if a sheet is protected or not?
>thank u

1/19/2010 12:12:14 AM
Hi Robert,


True = protected, False = unprotected.

"Robert Crandal" wrote:

> How can I determine if a sheet is protected or not?
> thank u
> .
1/19/2010 12:15:01 AM
        With worksheets("SomeSheetNameHere")
            If .ProtectContents = True _
             Or .ProtectDrawingObjects = True _
             Or .ProtectScenarios = True Then
                'it's protected
                'it's not protected
        End with

Robert Crandal wrote:
> How can I determine if a sheet is protected or not?
> thank u


Dave Peterson
1/19/2010 12:55:16 AM

Similar Artilces:

Only protecting the header cells and allowing new rows and columns to be created
i am developing a spreadsheet which i will be making available for download on my site im going to brand the spreadsheet with my logo etc I want to protec the logo and formulas etc I know how to do this However, when you protect the sheet - no new rows or new columns can be added apart from my branding and formulas etc i want visitors to be able to change as much as they would like how would i do this? --- Message posted from Hi depending on your excel version you can allo ro isnertions in the protection dialog (just check this option) -- Regards Frank Kab...

sort whole sheet by one column?
Can I make all the info in each row shift together when I sort by a particular column -Courtney Yes - if it doesn't automatically do this, it's probably because there are breaks in your data which make Excel think there are separate ranges. Highlight all the columns you want to sort together, and put the current selection in the column you want to use to sort (use tab so the current cell is in the column), then sort. Another method is to select all the columns, then choose Data | Sort..., and you can then pick up to 3 columns to sort by, in decending order. (In fact if you want to s...

Time Sheets #2
I have looked at various Time calculation examples but have not seen this really addressed Is there a way to have a time sheet where people do not need to enter time using military time or using AM or PM in the actual entry. We have a business that is a normal 9 - 5 business so there is no overnight or really late night work hours. If start time is in C2 , lunch out in D2, lunch in in E2, time out in F2. Normal time calculation is (F2-E2+D2-C2)*24 Am trying to use (IF(F2>E2,F2-E2,(E2+12)-E2)+If(D2>C2,D2-C2,(D2+12)-C2))*24 but am not getting correct answer (Trying to add 12 hours ...

Using VBA to time protect ranges
Hi hope you can help. Is it possible to use VBA to protect cells based on the current date. I am wanting to stop information from being changed that would belong to a past event ie I worked on Monday when I didn't Regards Don This is probably not the most elequent way to go about this but it does do what you are looking for. Sub Check_Date() Dim Today, check Today = Now ' Assign current system date and time. check = Range("D4:D4").Value 'Selects cells to check for date criteria If check < Today Then 'Verify if date is older Range("D4:...

Printing a Sheet
How about something a little easier is it possible to create a button on a excel sheet that when clicked will print the current sheet? Nick Yes. Go to "View", "Toolbars" and switch on the "Forms" tool bar. Insert a button on your spreadsheet from the "Forms" toolbar. Create a macro that prints whatever it is you want to print. Right click the button you inserted onto your spreadsheet and go to "Assign Macro". Assign the macro you have just created. -- Martin "Lord Of The Morning" <> wrote in message news:vmk0...

Urgent: How to bring data from another sheet into a droplist
Hi everyone, first post here. I have uploaded my excel file. it is 26kb I have a test tomz at uni, and i need to be able to bring data fro another sheet (sheet 1) from a droplist box on another sheet (sheet 3) These are just sales figures for a motorbike boots (my assignment). have made the drop downlist that has all the "sales agents" in it, bu i need to know how to make it so when you click one "agent" the dat comes from sheet 1 and brings up the relevant sales information. I have started putting the headings and...

determine mail flow problem!!!!!!!!
Help! :-( Our mailflow from 2 backend 2003 exchange servers keeps queuing up in the outbound queue (which is set to always run delivery). Messages stay in there from 10 to 120 minutes before being sent to our gateway MTA and then sent off site (to for example). However when I telnet from a backend server to the gateway over port 25 and send a test message it goes right away. I can't for the life of me figure out why. One example when viewed in message tracking history says: 10:16am - smtp: store driver, message submitted from store 10:16am - smtp: message submitted to ...

set or reset the print range for several sheets at a time?
how do you set or reset the print range for several sheets at a time? Manually I don't think it's possible to set more than one sheet's print area at a time. Of course a macro can make this a lot quicker. -- Jim Rech Excel MVP "Mestrella31" <> wrote in message | how do you set or reset the print range for several sheets at a time? Unfortunately setting the print area on grouped sheets is not an option without using VBA. Code from Bob Flanagan for setting same print area on groupe...

Determine columns used
I have 100+ spreadsheets which i have to edit into a certain format. The spreadsheets currently have 100 columns (from 1-100). From there i have to reduce the number of columns set to 8 columns. E.g: 1 2 3 4 5 6 7 8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 (from column 9 onwards, it goes to the 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 next rows' column 1) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 How do i do that without altering the order of the value of the cell? Let me make sure we understand the question. You have ...

Chart on a different sheet
I have numbers on SHEET2 that are all 7 cells apart: A1 A8 A15 A22 etc I want to create a chart on sheet 6 so I have copied the coordinate as such yo shhet 6 =Sheet2!:a1 =sheet2!a8 etc etc Is there a way that this could be done jmucg faster and better as my list is becoming very long. Thanks In Sheet6, Place this in any starting cell, say, in B2: =INDEX(Sheet2!A:A,ROWS($1:1)*7-6) Copy B2 down as far as required. B2 returns the same as: =Sheet2!A1 B3 returns the same as: =Sheet2!A8 and so on -- Max Singapore xdemechanik --- "pcor" wrote: >...

how to capture the event changing the name of a sheet
I would like to trigger a procedure whenever a user change the sheet name or add anew sheet. The event of new sheet can be captured but I don't know how to capture the event changing sheet's name. Please help No event is generated when a sheet changes names... What were you needing the event for? Perhaps we can help you get around the problem. -- HTH... Jim Thomlinson "Satyapal Kaushal" wrote: > I would like to trigger a procedure whenever a user change the sheet name or > add anew sheet. The event of new sheet can be captured but I don't...

how to determine the size of the sheet
Hi I had a collegue who told me once a way to dtermine the number of the rows in a sheet of the workbook I am working at. It is known that when you open a new workbook each sheet has maybe 65365 or something like that rows. MY QUESTION IS: HOW TO MAKE THE SHEET 1000 ROWS OR WHATEVER NUMBERS OF ROWS I ONLY NEED? Thanks in Advance, Ahmed Hi Ahmed The number of rows and columns are fixed. Your workaround would be to hide the ones you consider unneeded. HTH. Best wishes Harald "Ahmed SHEBL" <> skrev i melding news:%231uFO3IcHHA.4720@TK2MSFTNGP0...

virus protection
does virus protection come with this suite? On Fri, 26 Feb 2010 18:29:01 -0800, f. battles <f.> wrote: >does virus protection come with this suite? Ummmm... What "suite" are you talking about? This is a volunteer, peer-support forum for the database software Microsoft Access. Neither Access, nor Microsoft Office, includes and antivirus program. Microsoft doesn't sell any antivirus programs to my knowledge; check out // for their recommendations, or consult a good software vendo...

putting 2 charts on 1 sheet.
In Excel 2003, it is possible to copy a chart from 1 worksheet and paste on a worksheet that already has a chart? It doesn't seem to want to work right for me. One pastes over the other one. I'm thinking because the sheets that the charts are on originally were created for each chart. I was able to add a worksheet and copy/paste each one onto it just fine so I have what I needed. Was I just trying to do something that couldn't be done the way I was trying? Thanks for any input. Use worksheets instead of chart sheets. -- Don Guillett SalesAid Software dguillett1@au...

SD card Write protect- in MFC application(os vista)
Hi I am looking to config SD card to be write protect (By software) ? how Can i "write protect" from every one - to write to destination path like SD card ? i have seen define that is look like what i am looking : for example: MEDIA_WRITE_PROTECTED but i don't know any API that i can use to set it ? If any one knows of API to set the "write protect" status ? thanks Zack I'm not sure you *can* set it, but my SD card does have a write-protected switch on it. joe On Sun, 27 Jul 2008 17:34:25 +0300, "Zack" <> wr...

Dynamically determining when a month ends
Hello all, Ok, I have a simple excel spreadsheet, where I keep track of my spending on one tab, my income in another and my summary in a thrid. My problem happens when I try to dynamically calc. avg's for months in the summary page. For instance, if I want to see how much money I spent on average per month, or even per day, I draw from the data entered into the spending page. Now, the spending page is set up with the following columns: Date:: Description:: Amount The problem with this is that I can't predefine a max row # for each month, since I might have 80 entries in spending...

How do I determine
I have X number of rows that show employee names and a column (A2) that lists the value of products sold by each employee and I want to pay them a percentage based upon value of sales. For example: If they sell up to =A31,000 worth of products, I will pay them 3% of the value. Between =A31,000 & =A32,000, I will pay them 5% of the value Over =A32,000, I will pay them 10% of the value The amount paid to them in commission will be show in column (A3). Many thanks D.Haste "Hastey" <> wrote in message news:6a0a4fa9-adcd-484a-80...

Look up in another sheet for values to return in 1st worksheet
I have a workbook with 2 worksheets, 1 sheet is a simple summary showing the current months data and the ytd data (the month would be input by the user) as below. The second sheet will have the month by month information and the ytd. How do I get it to lookup according to month inputted and then pick up the correct corresponding data WORKSHEET 1 Enter Month "Apr" Month YTD Metric 1 Metric 2 metric 3 WORKSHEET 2 Jan Feb Mar APr....... YTD Metric 1 Metric 2 Metric 3 thanks Ralph Maybe you can you use INDEX an...

How do you determine if you have access to remote files
I'm trying to scan a list of servers for a specific file (say for example \\<servername>\C$\MyApp\Test.ini\which may exist on some servers but not on others. In addition, I may not have have access to all servers that I'm checking. When using any commands in Powershell (1.0) that attempt to get the file (such as Get-Item) PowerShell returns the same "Cannot find path '<filename>' because it does not exist.)" error message in the following two scenarions: 1. I have access to the remote filesystem and the file does not exist (expected beha...

Share sheet automatic on the internet.
Hello, I've got this spreadsheet where in I want one of the worksheets to be visible on the internet. This particular sheet is a sheet that shows the previous sheets making use of the camera tool in Excel. Is there a way to make Excel save and publish this sheet every time it is updated? Can Excel do this by FTP? There is no need to make it interactive. I have a server where I can make a special user and a password for this job. Could this be done with a macro? Thanks!! I think there is an option AutoRepublish every time this workbook is saved. you need chekc this option. On Oct 22, ...

use sheet name in a cell
Hi, I have more than a sheet in th workbook (15 sheets). I need to use the sheet name in certain cells in the sheet itself. i.e. sheet name is "January" , I need to have it in cell B200. Is there a way to do this automaticly instead of typing it in the cell? Thanks in advance Khalil Khalil, you can use this formula, =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) , to return the sheet name, the file must be saved first for it to work. -- Paul B Always backup your data before trying something new Please post any response to the n...

Determining A Rating
Hello, Suppose I have the following table: A B C 1 3 <3.80 2 3- 3.80 3.99 3 4+ 4.00 4.19 4 4 4.20 4.79 5 4- 4.80 4.99 6 5+ 5.00 5.19 7 5 5.20 5.79 8 5- 5.80 5.99 9 6+ 6.00 6.19 10 6 6.20 6.79 11 6- 6.80 6.99 12 7 7.50 7.99 13 8 8.50 8.99 14 15 4.91 16 4- Where A is a rating/score B is the low value range C is the high value range If I have a value in A15 of 4.91 (which is in the range of 4.80 and 4.99), I would like to return a rating in A16 of 4-. I've tried using a series of IF statements, ...

How do I determine the size of an excel worksheet?
How do I determine the size of an individual worksheet in an Office Excel 2003 file? The Properties featue only tells me the size of the whole file. Hi not directly supported by Excel. One workaround: Export this sheet to a separate workbook (with only this sheet) and measure its size -- Regards Frank Kabel Frankfurt, Germany "rajivsahib" <> schrieb im Newsbeitrag > How do I determine the size of an individual worksheet in an Office Excel > 2003 file? The Properties featue o...

Changing the positions of certain sheets in excel
I have a long worksheet consisting of 20 smaller sheets. These are arranged verically. What is the simplest way to be able to change the positions of some of the sheets e.g. sheet 13 should replace sheet 9, but sheet 9 should not be lost completely because it needs to go to another vertical sequence. Similarly, two more sheets have to change their position, withoutv losing the sheets that they will replace? Thank you Aamir If I understand your question correctly, then you can right click on a sheet tab and choose Move or Copy. "Aamir" <> ...

Rearrange sheet data
I need some help to get my data rearranged in my sheet. My spreadsheet contains Item Numbers and Customer Data. Column C to ? contains Customer specific information..Location...etc.. Col A Col B Col C:? Item # Customer Customer Specific information. 123 ABC Could be C:D or C:JJ 123 DEF 123 GHI 456 ABC 456 DEF I would like to rearrange the data to the following columns: Col A Col B 123 ABC Customer Specific info. C:? DEF GHI 456 ABC DEF One Item number could have 1 Customer or could have 1000...