Solved

Protecting embedded MS Excel graphs with a password

Posted on 2015-02-23
18
65 Views
Last Modified: 2015-02-23
I would like to protect a worksheet in MS Excel. It is rather easy to protect the cells, but the graphs don’t work anymore. The grapsh are created with VBA.
0
Comment
Question by:Frans_Truyens
[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
  • 11
  • 4
  • 3
18 Comments
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40625379
As the graphs are created in VBA, unprotect the sheet at the start of the routine and then protect it again at the end of the routine.

Thanks
Rob H
0
 

Author Comment

by:Frans_Truyens
ID: 40625382
How do I unprotect an embedded chart?
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40625417
How is the chart getting embedded and protected?

I am not aware of a means of protecting a chart other than by protecting the sheet that it is on.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Frans_Truyens
ID: 40625421
It is a complex MS Excel sheet with VBA behind it. When clicked on buttons, it needs to be unprotected, and protected again. I will try. I will keep you informed.
0
 

Author Comment

by:Frans_Truyens
ID: 40625423
No. THis is not possible. I need the double-click on the embedded charts. And the double-click doesn't work when the chart is protected. I need to protect the sheet, the cells I mean, and unprotect the embedded charts
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40625430
In the Protect Sheet Pop-up there is a list of activities that are allowed when the sheet is protected. One of these is Edit Objects. If you tick that option the chart on the sheet is still selectable.

Thanks
Rob H
0
 

Author Comment

by:Frans_Truyens
ID: 40625433
It is not that easy. When I do that, I cannot run my code. I need to be able to run the code, to update the charts. Either I don't lock the graphs, either I cannot update them. It is not that easy
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40625446
I think you need to be more specific. Why can't you run your code? What happens?
0
 

Author Comment

by:Frans_Truyens
ID: 40625449
The code is first deleting the previous chart, the contents of it. eg. de bars of the barchart. When I lock the graph, I can't delete the bars of the barchart.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40625451
Again, your code should unprotect the sheet, do what it needs to do, then reprotect the sheet.
0
 

Author Comment

by:Frans_Truyens
ID: 40625454
Problem is, when protected, the graphs should support the double-click event.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40625458
How are you intercepting that when they aren't protected?
0
 

Author Comment

by:Frans_Truyens
ID: 40625471
Indeed. I intercept the double-click event of the barcharts, I have written code for that. When they double-click on a barchart, or linechart, they jump to another sheet.
0
 

Author Comment

by:Frans_Truyens
ID: 40625474
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 40625479
All you need to do is right-click the chart, choose Format Chart Area, then in the Properties section, uncheck the Locked property.
0
 

Author Comment

by:Frans_Truyens
ID: 40625489
I am working with Excel 365. I don't find that checkbox
0
 

Author Comment

by:Frans_Truyens
ID: 40625492
I found!! I will try it.
0
 

Author Comment

by:Frans_Truyens
ID: 40625565
It works. Thanks.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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