Do not display password dialog box

Paella1

Active Member
Joined
Mar 10, 2005
Messages
382
My procedure loops through sheets and unprotects them. It registers password protected sheets and advises the user of the number of password protected sheets upon completion, but I can't stop the password dialog box from displaying along the way. The user has to click cancel. Is it possible to either:

-detect whether a sheet is password protected without trying to unprotect it, or
- bypass the password dialog box.

I have tried application.displayalerts = false and it has no effect.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Show some of your procedure.
Check out .protect userinterfaceonly:=true.
Cersion of excel?
 
Upvote 0
p45cal, if someone doesn't acknowledge you, how will you know that it wasn't just because you didn't help?
 
Upvote 0
p45cal, if someone doesn't acknowledge you, how will you know that it wasn't just because you didn't help?


There is a very limited number of words that you can put into the signature on this board. I didn't want only to say "if you don't acknowledge - get stuffed", I wanted to include the caveat that my response was worth acknowledging, the nearest I got to doing that was with the "If this has helped…"

So to answer your question - I don't. A few points:
I don't want to be acknowledged, I want the work/effort to be acknowledged.
If it's plain that significant work has gone into helping (or even trying to help) someone with their problem, that's where I look for it to be acknowledged. (There is an exception to this: if what I've offered is so totally wide of the mark, it clearly was of no help, it deserves to be passed by.)

It's usually fairly obvious if I've helped or not - in your case, very little effort went into my reply, so I don't expect it to be acknowledged, however, in this case, it's not really help I've given, more asked for clarification of your problem.

It's also obvious that you're not in a hurry to solve your problem (perhaps you've already solved it - on another board perhaps?) since you haven't answered the questions I asked. So if you're not keen, tell me, should I be?

It is also fairly obvious, from people's replies, what their mindset is; one word answers, sloppy answers, very sparse information given back, and the classic: a long period when the thread goes quiet, then seval days or weeks later you get a response from the OP which starts "Thanks for that help, but, how do you…" which makes it obvious that the person has been using the solution offered, hasn't acknowledged it, and has run into a problem. Only then do they think, 'Oh, maybe I should have said thank-you - OK, I'll do it now.'

People offering help on boards such as this, as you blinking already know, don't get paid for it. Beacuse it's free, people tend to think it's not worth much and don't value it. If they don't value it, it's not worth offering.

It's not just my offerings that I want to see acknowledged. Sometimes, the way a question is asked will expose that person's attitude to the help they might receive here. If that happens, or the person's name/handle seems familiar but I can't remember why, I'll look into the previous threads started by that user and see how he's responded to ohers' helping him, and on that record, I'll decide if I can be bothered to offer any help myself.

I'm not looking for effusive thanks, nor adulation, just a considerate, unselfish attitude from the person being helped. If that doesn't come through, again tell me - why should I be considerate and unselfish towards them? What does it cost them to acknowledge work? If they can't afford that small price, then I can't afford to help them.

You might think 'People aren't really like that'. Well, just look back at some of threads on this board - there are loads of people like that. It was because so often people didn't acknowledge help that I added the signature - one first-time user thought it was directed at him alone and complained. The moderators haven't asked me to remove it, and if they did, I would, and at the same time I would remove myself from the board too.

My other hobby-horses? Cross-posting without telling people where they've done so and unwilling to put any effort themselves into their solutions (you know - expecting to be spoon-fed all the way).

The people offering help here are human too.

I bet you didn't expect such a lengthy answer…



nor did I!
 
Upvote 0
My procedure loops through sheets and unprotects them. It registers password protected sheets and advises the user of the number of password protected sheets upon completion, but I can't stop the password dialog box from displaying along the way. The user has to click cancel. Is it possible to either:

-detect whether a sheet is password protected without trying to unprotect it, or
- bypass the password dialog box.

I have tried application.displayalerts = false and it has no effect.

I'm not sure I understand how you are checking for the protection. What code triggers the dialog box?
 
Upvote 0
I have a related question.

I have an Excel macro-enabled workbook (.xlsm) that has a number of sheets with ranges that are protected (not all). These sheets were protected programmatically via a VB.NET application.

I'm seeing some strange behavior when I initially open this workbook. No matter which sheet was active when I previously saved it, on Open Excel immediately activates the protected sheet and displays the Unprotect Sheet password dialog. I can click Cancel on the dialog and it will be presented again, then after I click Cancel the second time, it goes away and then the formerly active sheet from the previous save is activated.

The odd thing is that this behavior didn't happen in the past. I'm not sure what occurred to cause the behavioral change.

So (in short), can anyone provide some insight on why Excel might do this on a workbook Open and what, if anything, can be done on the Excel side to prevent it from happening?

(1) Detect a protected sheet and immediately activate it, and
(2) Present an Unprotect sheet dialog

Any ideas and suggestions would, of course, be greatly appreciated.

Regards,

Chris Fleetwood
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,921
Latest member
BBQKING

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top