Is there RefEdit control equivalent in Libre Calc? - dialog

Does anyone know what is Libre Calc’s equivalent for Excel’s RefEdit control? All other Excel UserForm controls seem to have corresponding controls for Libre Dialog forms. If there isn’t one, is it possible to tweak some other control (like Combo Box) into behaving like reference input box?
For those who don’t know RefEdit, it is the control that lets the user specify range address. More detailed explanation is e.g. in How to code a .NET RefEdit Control on Gabhan Berry’s Excel Programming blog or in KB213776.

Yes, there is such a possibility - you must use XRangeSelectionListener
By setting different RangeSelectionArguments you will get different picker behavior.
An example of a macro that is shown in this animation is here RefEdit_Demo.ods

Related

How input a (rating) value in Excel cell by clicking on a (5-stars-like) object

For the purpose of building an Excel survey form, I want to create an easy rating entry system that would set values in cells based on a single click on a rating object (form control). With this click on say a 5-stars object it would return a value (from 1 to 5) based on which star is clicked (0 if not clicked), value that would be stored in a linked cell. The form should have such 5-stars objects next to a list of questions.
Using Excel built-in controls would limit option to the spin button, which isn't as convenient.
I haven't found any other suitable controls, nor ActiveX (which would make it more difficult to share the sheet).
Thanks for your insights on how I can achieve this.
If you are willing to digress from your wish to have stars as buttons, the excel form controls seem to be more than able of what you are looking for. You could use Option Buttons to achieve something like this:
A detailed guide on how to use these Buttons can be found here

Can I insert an item with a specific color in a Listbox?

I'm developing an application with VBA in Excel 2013. I have a ListBox with items and I want to give each item a specific color depending on a criteria, I searched on the net but it says that it is impossible to do so, is that true?
I tried to use the listview (Microsoft ListView Control) but it doesn't show on the extra controls in the userform.
Does anyone know how to do give each item a specific color depending on a criterion using a Listbox if possible?
You cannot change the colour of individual items in an Excel listbox.
There are alternative ways you can achieve a similar result:
Use the ActiveX ListView control like examples here or here or here.
You can dynamically create an HTML Table and display that in a web browser control.
You can manipulate Excel cells to look and act like a listbox.
Your best best might be the ListView control but it could take some fancy footwork.
More Information:
MSDN : Using the ListView Control (Visual Studio)
MSDN : Using ActiveX Controls on Sheets
MSDN : ListView Properties
If you want to customize a ListBox in a UserForm, then you may use this DesignListBox
https://github.com/balin77/ExcelDesignListBox
It allows you to change any color, FontSize or Style.

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.

Grid control that can be placed on userform?

Does anyone know of a grid control that can be placed on an Excel UserForm, preferably something that is capable of displaying the content of a ADODB Recordset?
In VB window using 'Tools'->'Additional Controls' menu, there may be DBGrid control; check it.
In the VB window, using 'Tools->Additional Controls, there is a 'Microsoft Office Spreadsheet 11.0' control that is very powerful. This is true for Excel 2010, at least. Don't know about more recent versions.
Just throwing this out there for anyone that might be interested. I too as looking for a way to display what looks like a grid on a userform. Since I'm working on a shared program with different users having different versions, I shied away from the "Additional Controls.
Very simply, what I did was throw a number of labels into a frame, got rid of the borders, separated them with just the tiniest space in between and set the back color of the frame to a darker color. The result is below.

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