Hide And Password Protect The VBA Code So That They Can't Just Change The Pictures Visible Section To True
Nov 7, 2008
I've used VBA to make a picture appear when all the correct answers have been entered and it all works well. However, not to be too mean to 15 year olds, many of my students can be devious little feckers, and I want to hide and password protect the VBA code so that they can't just change the pictures visible section to true. I can password protect the workbook and worksheet, but not the VBA.
I'm entering the Visual Basic editor and I can see my simple script. I then click Tools - VBproject properties - protection. I'm clicking the "Lock Project for Viewing" box then filling in the password and confirming the password and clicking OK. But I can still see and edit my script, despite protecting the sheet and workbook.
I want to hide a sheet and I can do that. However, what I want to do it that when the user wants to view the sheet I just hid, he has to unhide and then enter a password. Right now tthere is no password.
I am making a database system that tracks student activity in my schools lab for people taking foreign language courses. I'm trying to make it so students must use the userform to manage they're checking in and out, and not be able to have any direct access to the Spreadsheet itself. Also, it would be nice if the whole Spreadsheet was hidden, invisible, and only the user forms could be seen.
I have a sheet that is password protected. I have this code attached to a command button. It will unlock the worksheet, autofilter it, print it, unfilter it, and password protect the sheet again. However it is protecting it without a password. I need to have it protected with the password so that someone will not be able to just go to tools to unprotect the sheet.
Private Sub CommandButton1_Click() ActiveSheet.Unprotect "rainforest" Columns("O:O").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:=">0", Operator:=xlAnd ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Selection.AutoFilter Field:=1 Selection.AutoFilter ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowSorting:=True, AllowFiltering:=True End Sub
I have an intern that is working with me, and I have a file that I need updated but one of the columns has confidential information so I would like to just hide & password protect this column this way he can't access/view this information but still have access to modify the rest of the spreadsheet.
I have an Excel 2007 workbook which has five sheets in. I just wondered whether it is possible to hide all five of them when the workbook is first opened. Also I would like the user to be asked for a password when they wish to unhide a sheet, with the password being different for each of the sheets.
Is there also a way to do this which won't be affected by Excel disabling all Macros when the application initially opens.
I am trying to add a command button that will set a custom view, password protect all worksheets, and finally password protect the entire workbook structure. The code I am using will correctly set the view and add the password to the worksheets, but it will not apply the password to the workbook structure. What do I need to add?
I need to be able to save a copy of my spreadsheet but protect the structure so that the hidden rows cannot be opened by the person that I e-mail it to. At the moment I am using the current
Private Sub CommandButton2_Click() Do fName = Application.GetSaveAsFilename Loop Until fName <> False ActiveWorkbook.SaveAs Filename:=fName Call ProtectRobin End Sub Private Sub ProtectRobin() ActiveWorkbook.Protect ("Robin") End Sub
The saving part of the macro is working perfectly, however I cannot get the protection to work. It must have a password - I do not want the receipient to be able to go 'Tools' > 'Unprotect Sheet'.
I have a 2010 excel workbook with several locked worksheet (to which I manage the PW). I and another staff member manage different section of the macro but the other staff member doesn't have access to the locked areas.
Is there a way I can encrypt the password within VBA so it's not visible to the other staff member?
Locking the VBAProject doesn't work as the other staff member has to be able to edit his VBA section.
Many staff run the macro (via a button) and don't need to access the Macro and don't have access to the protected sheets.
I understand excel isn't ideal with PW protection for people wanting to bypass the protection and this isn't an issue.
I have a worksheet where I have around 300 rows, each with 7 columns. What I want to do is add a checkbox to each column. I plan on setting non-applicable checkboxes to mixed status and locking the worksheet. I will unlock applicable checkboxes and sumif or countif their value according to row-based scoring, for example, each checked checkbox represents a value of 3. I do not know VBA and have chose to use the form control checkboxes rather than ActiveX.
I believe that a formula for this would be something like: =SUMIF(B1:B3,True,"3") or =COUNTIF($B$1:$B$3,True)*3
I am wondering firstly if I have that right and secondly if there is a way to stop my checkboxes from displaying labels. Currently, if I click on one it displays True behind the active checkbox. If I uncheck it, it displays False.
I have a button that I want to hide/unhide a section of rows.
This is the code a have so far:
[Code] .....
So I've named a a section of rows "rngHideRows". I've tried to use the command .Range("rngHideRows").EntireRow.Hidden = True (and viariants of this) but nothing I try works.
Sub Macro3() ' ' Macro3 Macro ' Macro recorded 8/16/2006 by BPETTIS '
' With ActiveSheet. PivotTables("PivotTable1").PivotFields("CT Comp") .PivotItems("0.9").Visible = True .PivotItems("1.3").Visible = True .PivotItems("1.4").Visible = True .PivotItems("1.5").Visible = True .PivotItems("1.6").Visible = True .PivotItems("1.7").Visible = True .PivotItems("1.8").Visible = True .PivotItems("1.9").Visible = True . It was recorded when in the indcated PivotField is selected the "ShowAll" option.
However, when I try to run this macro I get the following error
"Run-time error '1004': Unable to set the Visible property of the PivotItem class
Why am I not able to execute a recorded macro. Also how do I set a Pivot Item's visiblity to "TRUE"
I have on Sheet1 a table with a list of values in column A, and their corresponding picture in column B. On Sheet2 I have used the define name option to set up an index,match against the original table so that the relevant picture shows whenever someone selects one of the values in column A.
The problem is, while the pictures will change when the values are changed, because all of the pictures are "named", they will continue to show if a value not in the lookup table is selected.
Is there a piece of code that would allow me to specify if cell=blank,hide picture if not show picture?
I have seen the attached code, however this either shows or hides ALL the pictures on the active sheet, while I want to show or hide the picture in the active cell only.
I currently have a macro which i run by selecting tools, macro, macro and then selecting the one i want and pressing run. if i press run I want a box to appear asking me to input a password and if password matches then run that specific macro, can this be done
I am seeking a method of password protecting worksheets in a workbook. The users would all start on a sheet that has their names (A1 - A10) next to their names would be where they type in their password (B1 - B10). If their password is correct their assigned worksheet (Worksheet2) would be unlocked for editing.
1) I need to have code to protect the sheet that my user form is writing to. In other words, when the information from the user form is populated to the sheet, I want that sheet protected by a password that I set where I can unlock it, but no one else can.
2) I need to protect my VBA code with a password, I do not know how to do this, I have looked everywhere. I do however think this is something simple and I will kick myself once I find out where it is.
I have a workbook that contains a series of macros designed to compare various reports and spit out a report. I don't want my users to have to insert a password, but I want to keep my workbook protected. I've already protected the macros in the VBA Properties, so those are pretty safe, but the worksheets in the workbook are susceptible to changes that will hose my macros.
Setting the workbook to "Read Only" in Properties on our shared drive helps, but any user can change that at will. Within Excel, going to Options, Security, I can set a password so no-one can modify that workbook, but that pops up a password box when they open the workbook. I'd like to NOT have the password box pop up unless I need to make changes. Is there a way to do that? I've looked on the internet but can't find a solution on this one.
I had the thought that maybe it would be possible to have a worksheet that is not protected when saved but when it is opened there would be a sub-routine under Sub_Workbook Open that would step through each sheet and assign a random password. And when the workbook is saved it is saved without passwords again.
In this way there would be nothing for a password cracker to pick at. The only flaw I see would be that the password to open the VBA module would need to be static and this would open up the programming to change and remove. But wouldn't this be effective against most users who would only know about the utilities to open the passwords and not the programming behind excel.
I have one workbook with different Tabs that are tied to a master sheet. Different offices are respondable for entering their office information I was hoping instead of seperating the tabs into different workbooks and linking to the master, I could password protect each office tab. Can this be done?