Hiding a Master Shape in Stencil in Visio - hide

Is it possible to hide a master shape in your stencil so that a user cannot drag and drop it on their diagram, while still allowing me to use that object in the diagram programmatically?

You can do this by setting the Master's Hidden Property. This can't be set the the UI but it is easy to set in the VBA Immediate window with a statement like this:
Visio.ActiveDocument.Masters("MyMaster").Hidden = True

Related

Positioning an ActiveX Combobox in an Excel Document header

I have quite a simple question but cannot find a simple answer.
I have created a combobox and would like to place it in the header/footer of my document so it does not cover up data fields. See below:
Does anyone happen to know how to move it up there? I assume it will require VBA.
Here is a capture that demonstrates how far I can drag the box:
Thanks,
Dan
Consider the Worksheet interface.
It exposes a Shapes collection, which is [ab]used to hold the ActiveX controls you put on it. As you probably already know, an ActiveX control's Top property can't be negative; if you programmatically make it negative, it's only going to be set to 0. The ActiveX controls' setter for the Top property might look something like this:
Public Property Let Top(ByVal value As Long)
If value < 0 Then value = 0
mTop = value
End Property
Then there's a PageSetup property getter, that returns a PageSetup object - that's where you can configure, well, the page setup, including margins and custom headers. Notice the PageSetup interface doesn't expose anything like a Shapes collection: there's simply no support for ActiveX controls in the PageSetup object.
As a comment correctly pointed out, you can instead configure your PageSetup to have minimal margins and no content, and then do whatever you intended to put in the page header on the worksheet's client area instead - with the PrintTitleRows property you can have that "heading" appear at the top of every page, simulating a "page header" inside the client area where ActiveX controls are allowed to exist.

SSRS - Export to excel on different sheets without acting on on page breaks

Given a report like that is it possible in any way to split those tables into different sheets in excel without acting on the page breaks? I can't modify the print layout, so I can't change them. But I need those tablix to be each of them on a separete Excel sheets
There may be a way to do this, although I've never tried it. This will only work on SSRS 2008R2 or later.
You could add a rectangle between each tablix and set it to page break after. Then you can set the visibility of this rectangle based on what the render format is. Globals.RenderFormat.Name
So, add the rectangle between the current Tablix then in the tablix properties change the hidden property to an expression something like this.
=SWITCH(
Globals!RenderFOrmat.Name = "PDF", True,
Globals!RenderFOrmat.Name = "RPL", True,
True, False
)
The above will hide the tablix for interactive viewing or PDF export and not hide it for other formats.
There are several render formats depending on the version of SSRS so it's best to add a text box temporarily and set its expression to =Globals!RenderFormat.Name then export to all relevant formats and see what the name for each is and adjust the SWITCH statement accordingly.
Sorry, but the answer is no. SSRS only uses the page break property to create new sheets. In terms of a workaround, you could either have two versions of the report or you could add a parameter to choose whether or not to use the page breaks.

Inheriting Copy and Paste function on extended screens

We are trying to extend the concept of Copy and Paste function on screen to our custom screen so when users copy on Sales Order screen it should also copy the extended/custom screen fields so we can paste it back to new document.
How do we inherit copy and paste functionality to add those additional custom fields? Any help would be much appreciated.
The Copy-Paste feature only works with input controls and grid columns defined on Aspx page. To paste custom field values to a new sales order, you should create input controls for each custom field and verify they stay enabled for the Copy-Paste feature to work (values from read-only controls and cells are always excluded from the copy function).
Since the copy function does not check if control is visible on the screen (only is control is disabled), to extend the copy-paste function with custom fields you can add hidden control for every your custom field by setting Visible property to False in Layout Editor:

Excel Form Controls Don’t Have Properties

Why is there no way to access Excel’s Form Controls properties? In Design Mode when, for e.g. button is right-clicked, the only options that pop-up are:
Cut
Copy
Paste
Edit Text
Grouping
Order
Assign Macro
Format Control
When clicking on Properties under Controls on the Developer tab, the only control that appears in the drop down is Sheet1 Worksheet.
Is there a setting that needs enabling or am I forced to use an ActiveX Control?
If you want those properties, you have to use ActiveX. Form controls are designed to be simpler, but with fewer options, like properties and events. Form controls still have properties, just not as many and you can't access them from a property sheet like first class Excel objects. You can still manipulate them through the UI and through VBA.

How do I enable a range selector on an Excel ribbon bar?

What is the standard practice for adding range selection controls to a ribbon bar in Excel? I'm creating an Add-In and need to enable the user to define a series of ranges. Here's a link to a question with an illustration of what I want Provide a range selection tool/utility to the user in Excel VBA. The answer to the question however only works in the context of a winform. My research suggests you can't use RefEdit controls directly in a ribbon bar. Is that true? If so, what solution do you recommend? I considered creating a button that triggers a popup containing a RefEdit control, but that strikes me as a poor user experience since it involves additional clicks by the user.
Unfortunately, you are correct: the RefEdit control cannot be used within a ribbon. However, you can use a button control to populate an editBox control with the currently selected range, using the editBox's getText dynamic attribute. This will not only place a control within the ribbon that displays the selected range and holds the value there with a single click, but -- if needed -- other automated processes can be executed as well.

Resources