Is there a way to make UDF that gives a description like the native Excel functions have when user clicks the Fx button?
Type =FormulaName( into a cell and then press Ctrl+Shift+A and it will fill in the reference name of the arguments
Type =FormulaName( into a cell and then press Ctrl+Shift+A and it will fill in the reference name of the arguments
I don’t know exactly what’s wrong with your code. For one thing, though, you are not validating that a new, editable email is even open. The following proof-of-concept does exactly what I think you’re looking to do: insert some text into the active email being composed. If this is not possible it displays a message … Read more
I’m not very familiar with the shorthand method of referring to tables. If you don’t get an answer, you might find this longhand method, that uses the ListOject model, useful: Sub ListTableColumnMembers() Dim lo As Excel.ListObject Dim ws As Excel.Worksheet Dim lr As Excel.ListRow Set ws = ThisWorkbook.Worksheets(2) Set lo = ws.ListObjects(“tabWorkers”) For Each lr … Read more
It is a small world, as the code indicates I posted that code at another forum around 10 years ago having seen it somewhere else – I think on John Walkenbach’s old web site It is important to note that this code protection applies to worksheet protection only – not to Excel’s file open or … Read more
Just define the sub as Friend scope. This compiles fine for me in a VB6 class. Private Type testtype x As String End Type Friend Sub testmethod(y As testtype) End Sub From your error messages it appears your class is private. If you do want your class to be public – i.e. you are making … Read more
Yes, you can, if both variables are of type Variant. Here’s why: The Variant type is itself a wrapper. The actual bit content of a Variant is 16 bytes. The first byte indicates the actual data type currently stored. The value corresponds exactly the VbVarType enum. I.e if the Variant is currently holding a Long … Read more
shell(“C:\Users\USERNAME\AppData\Local\Google\Chrome\Application\Chrome.exe -url http:google.ca”)
Maybe others will find this useful. I have collected some different functions to generate a short hash of a string in VBA. I don’t take credit for the code and all sources are referenced. CRC16 Function: =CRC16HASH(A1) with this Code hash is a 4 characters long HEX string 19 code lines 4 digits long hash … Read more
The usual way to do this in VBA is to have A contain an instance of B as well as having A implement B’s interface, and then delegate calls to the B interface of A to the internal B. This is old stuff, but see the Visual Studio 6.0 Programmer’s Guide: http://msdn.microsoft.com/en-us/library/aa716285(VS.60).aspx There is a … Read more
As I have been explained (kudos go respectively), this is a COM feature. By default COM assumes an interface is extensible, that is, it allows adding members at run time. If that is not the desired behaviour, one can apply the [nonextensible] attribute to the interface definition, which declares the interface only accepts methods explicitly … Read more