Lock/Protect Single Module
Aug 21, 2006
I have a workbook(1), contains a worksheet that once filled with user entered parameters, generates data through a VBA module (macro). This module(1) is a proprietary algorithm, and the author has locked the VBA project to protect the module from being tampered with/modified (and rightly so).
I take this data and use it as input in my own algorithms to generate more data. By locking "VBA project" in that workbook(1), I can't see anyway to add my own module(2) to that particular workbook(1). I can create another workbook(2), and write a module(2) there that reads the data from the first workbook(1), but then I'm left with TWO workbooks to do a single task, both have to be opened, and its just not a very elegant way of doing things.
I've contacted the author of the proprietary module(1), and he has no problem modifying the lock protection in the workbook(1) so that only his module(1) is locked, but VBA is not really his forte, and he doesn't know how to do it, or if it is even possible. I've checked many Excel Help facilities, and could not find an answer.
1. Is there any way to lock a SINGLE VBA module within a workbook?
2. Also, is there only ONE VBA project allowed per workbook? If I could add an unprotected VBA project, I could add my own module.
I may not be understanding the entire VB architecture properly, I'm using manuals from 1993, and On-line MS Help is not that "help"ful, so any assistance would be greatly appreciated. Mainly I just want to find out if this is possible or if its not, in which case I'll be forced to work around it in a inelegant fashion. It just seems logical that you should be able to lock just one module.
View 7 Replies
ADVERTISEMENT
Jan 18, 2014
I am creating a File/Workbook using MACRO, however i need to ensure that one of the Modules in the created workbook remains protected and hidden...
Since there are lot of these files which are created, I would be interested in protecting them via a macro..
View 4 Replies
View Related
Oct 24, 2008
Can I lock cells and protect the sheet and prevent the user to select locked cells in xl97?
View 9 Replies
View Related
Jul 7, 2012
How to protect or lock their spreadsheets after certain date.
My question is how to protect or lock workbooks before certain date?
Example:
I have individual woorkbooks for each week in a calendar year saved in one folder.
Is there any way that I can protect them from either being opened or if opened than not be able to save anything in them until one week before the calendar week they are designed for (or whatever date I wish to set)?
View 3 Replies
View Related
Nov 27, 2006
I have a grid used as a shared diary and I need to automatically protect a cell by changing its colour to red, can this be done using VBA?
View 9 Replies
View Related
Apr 17, 2008
In the attached example, I have two fields. In the first (top), I have fields I want the user to be able to enter data (revenue/weight/skids). The information at the bottom is generated by formulas that act on the user-provided data and display the results at the bottom. The key, though, is keeping Excel-ignorant users from inadvertantly destroying the formulas and data in the middle section. I still need to display the results at each step, though, so hiding those middle fields is not an option. How can I lock only some cells within a single spreadsheet like this?
View 2 Replies
View Related
Mar 15, 2013
I have a spreadsheet whee teammates can inut the date in one cell and the exact time in another cell - how do I lock the cell with the time so it can't be changed?
View 1 Replies
View Related
Jan 9, 2009
Have a worksheet that will be used multiple times. User will enter name and employee number only on the first instance that the worksheet is opened. Would like to protect that info automatically for further usage. Most of the worksheet is protected but some cells need to remain unlocked so the "whole" sheet protection will not work.
How do I protect only specified cells, say F3, G3, H3, I3, after the user enters data thru an input box without changing any other protected cells on the sheet?
View 3 Replies
View Related
Jun 6, 2012
I have a SS that puls data from another sheet using the following formula
=IF(OR('Site Visit ASSESSMENT'!D9={"PARTIAL COMPLIANCE","NOT COMPLIANT","NOT ASSESSED","ADDITIONAL INFO NEEDED"}),'Site Visit ASSESSMENT'!A9,"")
I also have VB Code in teh sheet as follows to hide rows. If I protect colum A and protect sheet I get an error. How can I protect the sheet and still have the following commnad work?
Private Sub CommandButton1_Click()
'Toggle rows hidden where cells in column D are blank
If ActiveSheet.AutoFilterMode Then
[Code].....
View 6 Replies
View Related
Feb 1, 2013
I have a worksheet that is protected with data entry cells unlocked.
1. Unprotect worksheet
2. Lock all cells in the worksheet and then protect.
3. After a date in a cell in the worksheet.
I'm a newbie to vba and at least know vba is the only way. And this need to be automated.
View 1 Replies
View Related
Jun 6, 2013
1- If I wish to write in the cell I can do it ?
2- When I do not wish to write in the cell I can do it (Its meaning protect the cell.)
View 2 Replies
View Related
Feb 28, 2007
How would I go about lock a cell after there is an entry. Once the entry has been made the user could not change the entry. For example if a user enter in cell b2 he could not change the entry, he could change a2, c2, d2. He would also be able to put an other entry in b3, once enter the cell is lock.
View 5 Replies
View Related
Mar 5, 2008
I have a workbook list of activities that I am hoping will visualise the scheduling of routine maintenance tasks in my engineering department. The date of the most recent check is entered in row 6 and the interval in row 5. Hence the number 7 denotes a weekly check. The conditional format is such that the reds indicate that a check needs to be carried out. If the check is done on the scheduled day then a "Y" is entered into the square. This will then turn the square green. If "Y" is entered on any other day then the square turns orange to indicate the check is done, if not on time. The red squares do not change colour unless a yes is entered. This is designed to show the history of checks and give us the opportunity to show compliance to routines. What I need to do is lock the rows that have passed the current date, to prevent unscupulous modification. Thus the macro would look down column A and if the date is less than today() would lock the row. I have truncated the file as much as I can. A nice to have would be the facility for an adminstrator to go in (perhaps password protected) to make changes if necessary.
View 3 Replies
View Related
Oct 26, 2013
Trying to incorporate the following in a worksheet:
Lock the cells automatically in the columns that are older than 2 days or more
Lock the cells corresponding to today...
View 2 Replies
View Related
Oct 25, 2013
Trying to incorporate the following in a worksheet: Lock the cells automatically in the columns that are older than 2 days or more Lock the cells corresponding to today and yesterday using a command button after entering X Copy the sheet multiple times with the same features
View 14 Replies
View Related
Apr 20, 2008
I have the following question: I attached my file. In sheet "boekhouding" I want every cell in column H to contain a button that locks that specific row. So I can't accidently change the dropdownmenu for that row.
I also have some sort of strange problem in worksheet "Rekeningen", Range D1-D5 is named "Grootboek" were it should be named uitgaven. I can't change the name, but it doesn't seem to matter in worksheet rekeningen (the drop down menu for uitgaven works normally), what is wrong here?
View 11 Replies
View Related
Feb 26, 2008
I need to create a macro to where once a cell has had a formula or data inputed that it locks afterwards and cannot be edited without unportecting the sheet or not at all. The problem is I have no idea how to program in VBA. I can get there and select the worksheet but after that I am stumped. How would I enter the macro and what should the macro look like?
View 2 Replies
View Related
Jul 18, 2007
I have a worksheet with employees names and their overtime hours worked that week. I would like to add some code to a button that will prompt for a password. If that password matches a predefiened password then lock a range of cells and place a time stamp next to the button and maybe change the button color of the button to Red. Now if the person with the password wants to change the locked cells, they can click the button again and enter the password and the button will turn green so they can make the changes. I would like the time stamp to be updated every time the cells are locked. Also wanted to have one button for every work week so about four buttons per worksheet. Here is an example of the worksheet. The range of cells I want to lock are the ones in bold.
View 3 Replies
View Related
Mar 12, 2014
How to protect a single or multiple cell in excel.
View 1 Replies
View Related
May 5, 2008
I am having some 60+ workbooks in which the end-users are entering data. Each workbook is protected with different passwords.
We have the systems networked. The main compilation file is in the server D:MAIN folder. The workbooks for users are in D:Mainusers sub-folder. The files in users folder are only allowed to have access by the users.
Now, in the compilation sheet I have linked the data from all the individual files (which is in its subfolder). I am facing a trouble that the excel asks password for each and every workbook to update the links in the compilation workbook.
Any possibility to overcome this trouble? A VBA code is the solution? or any other alternative measure is there to solve?
View 14 Replies
View Related
Oct 3, 2006
I tried very hard to design a leave roster for user to mark their leave application. The criteria are as follows:
1. 4 applications per date
2. a region of worksheet (i.e. "A2 to H20) will be defined for users to "click" on the cells (within the defined region) to mark their application.
3. once a cell is clicked (i.e. marked), it cannot be altered.
4. each click will automatically increase the total by 1.
I got the following code to deal with the situation but user can still click on any cell outside the region (in fact I fail to define the region).
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim m
ad = Mid(ActiveCell.Address, 2, 1)
m = Range(ad & 24).Value 'here a formula "CountA(A2,A20)" will be place in the cell (24, c).......................
View 2 Replies
View Related
Apr 27, 2007
I have tried to record macro to protect VBAProject / lock project for viewing. But can not success by that way.
View 9 Replies
View Related
Mar 27, 2009
After all the awesome macros I've obtained with the help of all of you, I now have over 30 macros, each in its own module. I have tried without success to re-name the modules with no luck. How is everyone organizing these?
View 2 Replies
View Related
Jan 24, 2013
Let's say i have 2 Modules on my VBA forms, is it possible to Copy all the Codes in Module 1 and Paste it to Module 2 by using a Command Button?
View 1 Replies
View Related
Jan 19, 2012
i got a question how i can make a msgbox in one module with 'Yes' linking to a different module.
such as: this is located in module2
Code:
If MsgBox("Do you want to activate module1?" & vbCr & _
"" _
, vbYesNo, "Choose") = vbNo Then Exit Sub
i want that vbYesNo different
No as in Exit Sub
yes as in activate Module1
View 5 Replies
View Related
Oct 25, 2011
What i have at the moment is a module that contains code where i call a different module that i use as a procedure.
Module1
Code:
If Sheet1.Range("C4").Value < Sheet1.Range("A2").Value Then
If Sheet1.Range("K4") = "" Then
MsgBox "Please check 06:00 tasks not done yet!"
Cell = "Range(" & Chr(34) & "F4" & Chr(34) & ")"
If Sheet1.Range("C4") + 0.042 < Sheet1.Range("A2") Then
Run "EmailProSheet"
End If
End If
End If
EmailProSheet is what i call but now i want to use the variable "Cell" in the procedure as well?
Module3
Code:
MsgBox Cell
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
[Code]........
As it is now everything is working fine but does not return a value in "Cell" if the procedure is called. Is there another way?
View 5 Replies
View Related
Aug 18, 2004
I recieve an error :
Run-time error '50289':
Can't perform operation since the project is protected.
When i try and run my code.
The code does add parts to modules and workbook events, but I need the code to be protected.
View 9 Replies
View Related
Jan 17, 2013
Some sensitive data is held on worksheets that are used by people that do not have access to see the data.
It would be most convenient to keep the data in these worksheets but hide it from view of the users.
Is there a way to password protect a users ability to unhide a column?
View 2 Replies
View Related
Jan 12, 2007
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
View 3 Replies
View Related
Jul 2, 2009
do you know if there is vba code to lock formulas so someone sees but does not touch and the same for values see but cant change??
my sheets with formulas are SUMMARY and Sheet2
sheet with value is TABLE
View 9 Replies
View Related