Solved

Make Excel File for End user in Read Only

Posted on 2011-02-19
3
849 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE) 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

719 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