Disable Advanced Filter in Excel 2013 - excel

I was wondering if anyone could help me to disable the Advanced Filter option in Excel 2013.
I have used the following to disable all other data ribbon options:
.Protect UserInterfaceOnly:=True
But advanced filter is still able to be selected. With this they can unfilter the data.
The following code used to work in older versions of Excel but I cannot seem to get it to work for Excel 2013:
Application.CommandBars("Worksheet Menu Bar").Controls _
("&Data").Controls("&Filter").Controls("&Advanced Filter...").Enabled = False
If anyone could help me out with this or point me in the right direction then it would be appreciated.
Thanks guys.

Solution Suggested
The approach will be hiding the button from the user interface: the advantage on this solution is that the code is not in VBA (entirely) so, is not that easy for the user to modify it (or know what is going on backstage).
Answer Explanation/Next steps
It's really a deep answer with many steps involved in it so, I'll just post guidance and some useful links, that way you may research about it first.
1. Download Custom UI Editor for Microsoft Office: this helps to modify the user interface for the document.
2. Look for tutorials; start to code there with something basic like adding a tab and a button, (this is a good one)
3. Back to Excel, look for life cycle and custom events, this is a good place to start
4. You'll need to catch the event when the Ribbon is loaded; in that time, you'd need to disable the button, these links (1,2) are useful to show the steps and some example workbooks for it.
5. Locate the ID for the button and disable it (Hint: The idMSO = AdvancedFilterDialog, if you 've followed the previous steps, it will make sense here-).
Further information/Answer Disclaimer
Excel is not a software that can handle security deeply; if you are trying to restrict the user somehow in the original file, you should try other approaches -IG: a copy of a workbook for reference only, while the master one is saved in a sharepoint only modifiable by people authorized for it-.
While FAQ in S.O is strict about referencing to other sites without using a proper reference for it, this is a deep step solution that would take pages to explain even a random example; appealing to the guiding topic, this answer should be ok.

Related

SharePoint Online chart

I would like to display a graph on the home page of my sharepoint online site. I can add in a quick chart but it does not fit my requirements.
Basically, I have a task logger where i log all incoming tasks, they are assigned a status - closed, completed, in progress, on hold, and pending.
I would like to display this visually on the home page so we can see how many tasks per status.
I think the x axis would the status and the y axis would be the value.
I'm not sure how to achieve this? i've seen multiple examples of coding for this but being inexperienced in coding, i'm not sure how to amend or adapt the codes for my requirements.
If someone could please provide a solution or have any ideas, that would be greatly appreciated.
We can use the solution below from GitHub to achieve it.
Modern Charts
Or we can use modern script editor web part with chart js plugin and REST API to achieve your requirement.
In classic site page, we can use script/content editor web part with custom JavaScript code to achieve it.
If You don't plan to code the solution I would suggest two different then quick chart webpart approaches:
File Viewer webpart - You could create some excel file to store all Your task list there. This file could be stored on some document library. The excel file could have data in one tab and chart in other. Using File viewer You could add this excel file on any SharePoint page. On one Page You could present the tab to change data (tasks), on other the tab that has the chart. I know..a bit of a workaround but this is one of the simplest solutions I thought of without coding :)
Power BI- this tool for sure may will fit any needs as in this tool You may do almost anything. Of Course You need Power BI server for this. You may create any chart/report with this also from data taken directly from SharePoint
Hope this will be of any help to You

Creating a string picker dialog from a collection in vba via built in dialog?

(Questions with an answer of NO are still useful; they're just not the solution to the problem. Answers say, no, there is no built-in, you have to implement the dialog for yourself...)
In VBA, (ms-word, or ms-excel, but seems like a generic operation) is there any way to simply a provide a collection to a built in dialog in order to prompt the user to select a value from a list of values?
I can't believe there's not a built in method to do this, it seems like a such a generic operation that could be coded once and everybody would re-use it. I can certainly hand code it, but why bother if it's already in the vba libraries someplace.
I've searched for a solution, but it does appear that the standard answer is to hand code it.
My aproach would be to create a Form, add a ListBox, Ok, Cancel and the ShowModal property.
To use it first set the ListBox RowSource according to what you need:
https://msdn.microsoft.com/en-us/library/office/ff196460.aspx
Then make it visible, manage Ok/Cancel and then use the ItemsSelect property (multiselect is possible):
https://msdn.microsoft.com/en-us/library/office/ff823015.aspx
Yup, no such thing.
Hand-code it, and keep it as part of your VBA "toolbox" - make yourself an add-in that other VBA projects can reference, so you can reuse the code without having to rewrite it every time.
Then export the code modules from your host document, upload them to a GitHub repository, and share your solution with the world so the next person looking for it doesn't need to implement it from scratch again.
The VBA standard library is rather limited, and beyond MsgBox there isn't much available in terms of built-in UI. That's just how it is.

SharePoint 2013 KnockoutJS Lookup columns

I have a basic knockoutjs project loading data from a SharePoint 2013 list scenario. Getting data and displaying data is easy, the problem that I'm running into is on the edit mode displaying the proper control. Everything should not be a textbox. This means the people picker control to dropdownmenus to calendar controls.
MSFT has some pretty good documentation on using the client side people picker control here"http://msdn.microsoft.com/en-us/library/office/jj713593.aspx
The problem that I have is calling this control inside my viewmodel.
Setting the value of the control doesn't look difficult courtesy of this blog post: http://www.sharepointcolumn.com/sp2013-setting-people-picker-value-in-newform-aspx/
I attempted to looking into computed values, but that doesn't seem to work. Does anyone have a blog post that I skipped over? The closest related post that I can find: http://yetanothersharepointblog.wordpress.com/2012/12/11/working-with-sharepoint-lookup-columns-in-knockout-js/
Lastly since it seems that I'm the only one doing this, does anyone think that I should not be reinventing the wheel with my forms and should just link each item to the appropriate SharePoint list item in edit or display view? I suppose that would be easier.
From a SharePoint Professional to another, I would highly recommend you to do that.
Just redirect the user to the item edit/display item page an let SharePoint take the leash of how to handle UI form elements.
Because, assume that you implement your custom form, what if the user decides to add one more site column to the list? Will you update your code to support another field?
From my personal experience with the beast I've come to the conclusion that structural implementation over already existent functionality tends to go wrong.
Also, if you have some kind of listing of items custom made and you want to provide editing, try to do something opening a pretty SP.UI.ModalDialog, its elegant and you use the sharepoint to do the work for you.
But it's just an advise.

How to find which solution has a ribbon button in MS CRM 2011

I have inherited a heavily customised - hardly documented CRM 2011 instance. There are over 80 in-house managed solutions and one of them contains a ribbon button that isn't working as desired.
What is the quickest way to find which solution contains the button?
I'm figuring that I'm going to have to export the most likely candidates unzip them and search through the files in what is looking like the most epic needle and haystack adventure of my life. I would like to avoid this brute force approach if I can.
If you already have a lot of solution, can you add one more :) in that solution you can only include your Application Ribbon component and Case entity. Fix appropriate button and import solution after 80 others.
Hope it helps.
EDIT: But if that is not an option, you can find that in database. Get record in table [RibbonDiffBase] where [RDX] column contains ID of your ribbon button. Then, when you have results, check SolutionId column. You have all solution IDs which have included definition for your ribbon button.
Next, go through [SolutionBase] table and find Name of your solution (based on SolutionID).
I still preffer my first answer, it is more elegant. But, also hope that second part of answer will be helpful.
Try using Ribbon Workbench:
http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx
You will get an error logg directly when you load each solution, hopefully sith the exact faulty ribbon button also, this is not the case always, mot often!
Good luck

How to get Google page rank and number of searches in Excel sheet?

I have a link in one column and, based on it, I want
Number of Google searches in column 2
Page rank of first result in column 3
I know this can be done, as I saw a friend pulling google search result right in Excel. If anyone knows, please share how I could do that.
If I correctly interpret your question, one of the tasks you had to do is
How do I get programmatically the Google page rank for a list of URLs?
You can find the code to do this in this CodeProject article:
Request Google´s Pagerank programmatically
Regarding the Excel part: it depends which programming framework or platforms you could use. You could use to create a .NET extension for Excel using the Microsoft Visual Studio Tools for Office.
From Excel there is Data->Get External Data->New Web Query. Is this what you want?
You have two options, both of which are unfortunately poorly documented.
If you are comfortable in C/C++, you can write a special DLL called an "XLL" that you can call during Excel runtime. There is some sparse documentation available. Note that this stuff isn't very fun to use.
If you prefer .NET, there is a binding for the entire Office suite outlined here that allows you to write COM-based methods that you can call from Office. It is intended for automation, but you can write any managed code you want and have Excel call into it.
There is also what Remou just suggested; I don't actually own a copy of Excel to test that out, but it may be the easiest option.
By link i meant keywords and not URL. I want to put a keyword in one cell and pull number of searches and page rank in adjacent cells.
I tried doing the same with web query in excel but i can only reach till the number of searches. that too not in the proper cell (trying to figure out). But i have no clue about how to get the pageranks.
I am not that tech savvy to code a binder or plugin for myself. Although i am checking the link by splattne. Please focus more light on it. Is it gonna be time consuming if i try to make this one..?
Regards
Thinkjayant
There are some nice plugins for this (in various languages) on GitHub:
http://github.com/search?langOverride=&language=&q=pagerank&repo=&start_value=1&type=Repositories&x=0&y=0
I have a PR checker functions in my Excel plugin "SeoTools".
http://nielsbosma.se/projects/seotools/

Resources