Solved

Make Excel File for End user in Read Only

Posted on 2011-02-19
3
818 Views
Last Modified: 2012-05-11
How to make an Excel File to be opened to the end user in only Read Only mode, the end user should not be able to save the data that have been queried in the same spreadsheet.

EX: I have an VBA in the excel , if the end user has extracted data using my VBA and displayed in the spreadsheet, but he should not be able to save the spreadsheet altering from original.


0
Comment
Question by:srikanthv2322
3 Comments
 
LVL 2

Accepted Solution

by:
mscanlon06851 earned 167 total points
ID: 34933648
Why don't you just set the read attribute of the user's Excel file to read-only?  

Launch Windows Explorer
Navigate to the folder containing the Excel workbook
Right-click on the workbook name
Click Properties
Click on the Read-only box
Click OK

0
 
LVL 22

Assisted Solution

by:rspahitz
rspahitz earned 166 total points
ID: 34934250
Yup...that's what'd I'd do too.
Another way is to save it as a template.  If the user tries to save, it will typically save as a different name so the original is still there.  (Not as fool-proof as the read-only windows flag, though.)
0
 
LVL 50

Assisted Solution

by:Ingeborg Hawighorst
Ingeborg Hawighorst earned 167 total points
ID: 34935781
Hello,

you can protect the worksheets against changes as described above. But the user will still be able to use the Save As command to save a copy of the workbook.

If you would like to disable that, you can put a macro in the ThisWorkbook module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    If SaveAsUI Then Cancel = True
End Sub

Open in new window


See attached file. You will need to password-protect the VBA code, too.

I've not protected the VBA, so you should be able to change it. The attached file is for Excel 2007 and later, since you did not specify an Excel version.

Note that it is pretty easy to disable the VBA password in Excel 2003.

Password protection has never been good in Excel. It's a bit better in versions later than 2003, but you never know what hacks will be cooked up and posted on the internet soon.

cheers, teylyn
test.xlsm
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now