Topics Search

Protect the VBA Code

Protect the VBA Code
Views: 15
I have MDB and user can press Shift key to access in the VBA code. How to prevent this during the form loading time ?
Sponsored Links:

More topics

 

how to protect queries and VBA code against stealing

Preview
We are designing a database which has several queries and vba codes. We don't want anyone to view the queries or steal them as it is proprietary information.

What is the best way to password protect the queries and VBA codes and still letting the users to use the database.
 

Access - Open Document / Protect

Preview
I'm trying to figure out how to open a Word doc from Access, populate certain fields, then protect the document from editing (just allowing form entry).

All of this is relatively simple, opening the document and populating the fields. The problem comes that you cannot populate the fields in a protected document, therefore, the document must be unprotected.

Then, because the control has passed to Word, I cannot figure out how to protect the form from my Access VBA code.
 

Make your own CODE to lock the database objects

Preview
securing the database objects have different ways:
1. Password protect the database
2. Password protect the VB codes
3. Disable allowbypasskey
4. Make MDE file for versions 2003 and previous
5. ULS

MY PERCEPTION:

a. the simplest way to protect is by password protecting
b. Allowbypasskey diabling is a protection done by vb code
c. by making the MDE file, the forms, report, dap, macro, and modules are locked thereby it cannot be opened for editing or for opening.
d. by making ULS, the objects are locked by access, I think this goes by code again and we setup its password.

MY CONCLUSION:
Therefore, protecting the database objects were done thru coding matched by password. So therefore, maybe there is a way that we can make our own CODE to lock the database objects.And I think our gurus here in this forum might help us out with that code.Can we do this?
 

AllowEdit Range on excel spreadsheet via Access VBA

Preview
I am struggling a bit in Access VBA. I export files from Access vba and then open the file and do some formatting and then password protect that excel file. However I want the user to able to edit two columns. I try below code but it is not doing the job. It gives me runtime error 1004 Method Columns of object_Global failed.

With xlApp
.Visible = False
.Workbooks.Open (outpath + outfile1)
.ActiveSheet.Protection.AllowEditRanges.Add Title:="myRange", Range:=Columns("O:P"), Password:="pass"
End with
Peace
 

Password Protect an Email Attachment in Access 2007

Preview
I am trying to password protect an attachment (in pdf) which is to be sent on a monthly basis to different employees. Actually it is a payslip. Is it possible to protect and open such an attachment?. I want to use a combination of employee name and employee id to open the attachment. I am using outlook for emailing purposes.

Please let me know on a possible solution for this
 

import/export of forms with VBA code password

Preview
I'm trying to import a form from an older version of a database in an effort to keep from building it from scratch again. When I try to import from the new or export from the old I get an error message that says "Microsoft helps protect this Visual Basic for Applications Project with a password.

You must supply the password in the Visual Basic Editor before you can performthis operation"

I have the VBA editor open, with the correct password!
 

Hide VBA code from users

Preview
If your database contains Visual Basic for Applications (VBA) code, you can hide that code by saving your Microsoft Office Access database in the .accde file format. Saving a database as an .accde file compiles all VBA code modules, removes all editable source code, and compacts the destination database. Your VBA code retains its functionality, but the code cannot be viewed or edited. In general, the database will continue to function as usual — you can still update data and run reports.
 

Hide VBA code from users

Preview
If your database contains Visual Basic for Applications (VBA) code, you can hide that code by saving your Microsoft Office Access database in the .accde file format. Saving a database as an .accde file compiles all VBA code modules, removes all editable source code, and compacts the destination database. Your VBA code retains its functionality, but the code cannot be viewed or edited. In general, the database will continue to function as usual — you can still update data and run reports.
 

Cannot open VBA code

Preview
A few days ago my database suddenly started pumping out this error message:
"The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code form modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project."

This message appears every time a form with VBA code is opened, and every time I try to open the VBA editor. Of course I have a backup, however I rather not be forced to redo about 6 hours of work.
Looking across the internet it seams like quite a few people have had this problem, but no solutions. As far is I can tell, something in the VBA code has caused the database to become corrupted.
So my question is this, is there any way I could possibly recover at least some of the code? Could I somehow force Access to show me the code, even if a part of it is corrupt?
 

Update table via VBA code

Preview
Have a table (several hundred entries) which must be updated weekly using VBA code. I know how to write the actual VBA code (for each record) but I do not know how/where/what is necessary to open the table, read each record seq and update based on VBA code (function call return value) and to finally close table.