View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default 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?