Sabtu, 03 Maret 2012

[ExcelVBA] Re: How to hide password request box...thanks only

 


You never know when you'll need something you read somewhere that helps you on something. This is that 'when' (;-)

I wasn't even sure where I saw this, but a quick search here on 'unprotect' snagged what I needed...

This is just a thanks to Pascal and FYI. No question yet...

Why:
I am changing an existing workbook to handle another very similar situation that has a few, but important changes internally as well as to the user interface. I'm going to try to use the original, debugged workbook, then have VBA make the changes (allowing it to 'be' one of the two types), but some sheets and areas on sheets are protected so the user can't mess up the formatting. Now, I know how to do it. In the past I had been doing the crude "Unprotect, Change, Protect".
At first, this will be two separate workbooks where *I* set a variable (hard code, upon Open) so it acts like just one of the two.
Eventually, after it is all debugged, I hope to have one that uses an external trigger to enable the appropriate 'version' on the fly.

So... Pascal's help gives me what can allow part of what I want to do, so thanks.

Some less obscure background FYI:
I made workbooks that do serial/USB I/O to amateur radio (ham) transceivers. You can operate them and up/download frequency memories and settings. They have lots of memories and 'menu' settings that are more difficult to set up from the front panel.
U.S. and Foreign versions of the same radio have different frequency ranges and functions that require differences in the User Interface - some things don't exist on some versions. I'd eventually like to have VBA ask the radio which one it is, then leave or hide the things needed to handle the connected radio. Sort of a Plug and Play concept.
I guess I don't know that I can't do it, so I'll try. (;-)
--
Cheers, Steve N.

--- "Pascal" <pascaldaulton@...> wrote:
>
> another two possibilities:
> 1. Have a line in the workbook open event:
> Worksheets("Requirements").protect userinterfaceonly:=True
> (I 'm not sure whether you'll have to supply the password as well.) This will allow vba to manipulate data on that protected sheet without it having to be unprotected and later re-protected.
>
> 2. When protecting the sheet there is an option to allow users to sort.
>
>
> --- Tony Davis <studiot@> wrote:
> > I have created a worksheet...
> > My question really is, is there
> > anyway of stopping the display of the "unprotect worksheet box"?
> >

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar