I am writing some VB macros in Excel 2007 (VB 6.5). In the Excel window, if I type in a conventional function (=MIN, =MAX, etc.) the tool will begin to auto-complete the list of functions. My functions also appear in this list (good so far). However, when I double click on the function name I would like to get a similar help dialog that I would get with the included Excel functions. For example, when double clicking on MIN a little comment containing MIN(number1, [number2], ...) pops up to let the user know what arguments are required and in what order. I would like a similar feature for the functions that I'm creating. Is this possible?
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
If you want tooltips, then no. If you want the function wizard, then see the article DO linked to.
Thanks guys, I have implemented the code and got it working. However, I would like to future-proof myself by using the Excel2010 ArguementDescriptions option in Application.MacroOptions. My problem is that I get a compile error with the code below. I am looking at compiler directives (change if/else/end to # statements) but can't figure out a way to get the Excel Version prior to compile. Any thoughts?
Public Sub ApplyDescription(FuncName As String, FuncDesc As String, Category As String, ParamArray ArgDesc() As Variant) If (Val(Application.Version) >= 14) Then Application.MacroOptions _ Macro:=FuncName, _ Description:=FuncDesc, _ Category:=Category Else Application.MacroOptions _ Macro:=FuncName, _ Description:=FuncDesc, _ Category:=Category, _ ArgumentDescriptions:=ArgDesc End If End Sub
Perhaps it is new to Excel 2010?
http://blogs.msdn.com/b/excel/archiv...19/482826.aspx
@MarvinP
The Formula AutoComplete will not display tooltips for anything other functions in .xll
Quoting the blog you referenced:
Originally Posted by David Gainer 21 Oct 2005 7:01 PM
Originally Posted by David Gainer 25 Oct 2005 11:18 PM
Last edited by DonkeyOte; 09-30-2010 at 04:06 PM. Reason: added note that post related to Marvin's link (rather than to OP)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I think there is some confusion. I have fully resolved my original question and am wondering about compile time directives (can I get the Excel version number). I will start a new thread.
Thanks for everyone's help!
You've got your If ..End if the wrong way round, but I think what you want is actually conditional compilation (#VBA7 is the constant you want)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks