ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retrieve Macro description (https://www.excelbanter.com/excel-programming/303380-retrieve-macro-description.html)

R Avery

Retrieve Macro description
 
I see that with "Application.MacroOptions", I can set the description
and shortcutkey for a macro, but how do i retrieve the macro description?

keepITcool

Retrieve Macro description
 

I assume we're talking a VBA macro not an XL4 macro.
for an xl4 macro's it's a property of the nameobject assigned to that
macro.

Ofcourse M$ doesnt make it as easy for VBA :(

for a C++ example see
http://support.microsoft.com/default.aspx?kbid=274680

Which does..

enumerate all Procedures in a VBA project
find the module..
find the line...

This example however does NOT get you the descriptions, just the
procedures...

I've tried it with VBA extensibility and you simple cannot read the
hidden lines :(


If it's a 'VBA macro' (a sub procedure in vba module)
then the name is inserted a a hidden line in the module..

Export your codemodule and open it in a text editor)

you'll see somethin like:
Sub DoDate()
Attribute DoDate.VB_Description = "Inserts a date"
Attribute DoDate.VB_ProcData.VB_Invoke_Func = "d\n14"


Chip Pearson has some (ULTRA complex) code examples of using the
TypeLibraryInfo TLBINF32.DLL ..


maybe that could do the job...
sorry :)



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


R Avery wrote:

I see that with "Application.MacroOptions", I can set the description
and shortcutkey for a macro, but how do i retrieve the macro
description?



Ivan F Moala[_3_]

Retrieve Macro description
 
I see that with "Application.MacroOptions", I can set the description
and shortcutkey for a macro, but how do i retrieve the macro description?


This Addin may be of use to you ?
It will list your Macro shortcut keys, Macro Name and Discription.

http://www.xcelfiles.com/GetShortCutKeys.html

R Avery

Retrieve Macro description
 
Thanks a lot, both of you. This is great!


Ivan F Moala wrote:
I see that with "Application.MacroOptions", I can set the description
and shortcutkey for a macro, but how do i retrieve the macro description?



This Addin may be of use to you ?
It will list your Macro shortcut keys, Macro Name and Discription.

http://www.xcelfiles.com/GetShortCutKeys.html



All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com