Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Make Excel File for End user in Read Only

Posted on 2011-02-19
3
Medium Priority
?
858 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 668 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 664 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 668 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
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 demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

610 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