Solved

Open Excel read only or modify mode

Posted on 2016-10-10
3
49 Views
Last Modified: 2016-10-30
How can I Open Excel with only one popup and if user enter password "passwd1" I want to open the excel with read only mode and if user enter password "passwd2" then I want to open the excel with modify mode.
0
Comment
Question by:Bharat Guru
[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
  • 2
3 Comments
 
LVL 7

Expert Comment

by:D Patel
ID: 41837894
Your query is going to be answered at here :

https://support.office.com/en-us/article/Protect-an-Excel-file-7359d4ae-7213-4ac2-b058-f75e9311b599

Thanks and Regards,
D Patel
0
 
LVL 7

Accepted Solution

by:
Andy earned 500 total points (awarded by participants)
ID: 41837902
The functionality you ask for isn't built into excel by default, the options you have are below (assuming the sheets are on the same workbook):
You could use the 'Allow Users to Edit Ranges' option in Excel.

Or you could use VBA code such as:

Private Sub Workbook_Open()
Dim sh As Worksheet
For Each sh In Sheets
   sh.Visible = xlSheetVisible
Next sh
Select Case Environ("UserName")
Case "User1", "User2", "User3"
   Sheet2.Visible = xlSheetVeryHidden
   Sheet3.Visible = xlSheetVeryHidden
Case "User4", "User5"
   Sheet2.Visible = xlSheetVeryHidden
   Sheet1.Visible = xlSheetVeryHidden
'etc
Case Else:
End Select
End Sub

It goes in the This WorkBook module and runs when the workbook is opened.
User1 etc. aren't  users actual logon names. You'd need to replace them with the users actual names.

Thanks,
Andy
0
 
LVL 7

Expert Comment

by:Andy
ID: 41865733
Question was answered directly as required by the OP
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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 simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
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.

749 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