![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 29
|
I have done some searches on this site for password info. It is simple enough to password protect the whole book, but I am getting hit or miss info on the password protected sheet idea. I understand Excel passwords are lame at best, and maybe someone can ofer a better idea...
We have a workbook that is acting as an inventory log (of sorts) and we want to be able to use it as data entry, report generation and cost control/tracking. So far we can do the data entry and report features, I just can't think of a way to only allow admin users access to the cost side, while still showing an inventory listing with final retail costs on the other page. Since many users will be using this file, it would have to be able to either keep users from looking at the admin sheet, or else hiding the data until a password or something is entered. I am open to sggestions to the possibilities of multiple workbooks, I am just limited in VBA, and still figuring out the complexities of Array formulas. Any suggestions??? BTW, I have had no luck in "Protecting" a sheet. Maybe I am misunderstanding the concept of the "hide" feature, but I still end up with a mostly editable sheet, that is fully visible. Thanks in advance, Russell |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
These line will hide a worksheet:
sub HideWS() Worksheets("Cost").Visible = False end sub The following lines will only unhide it if the password entered is correct: Sub UnhideWS() answer = InputBox("Input Admin Password") If answer = "Your Password" Then Worksheets("Cost").Visible = True end sub You should assign UnhideWS() to a command button or something. This method is very easy to break and doesn't provide a lot of protection to an advanced user.
__________________
Kind regards, Al Chara |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|