![]() |
How to retrieve procedures ans functions names in VBA ?
Good morning,
I am using WIN XP SP2 and Excel 2007 Microsoft explains in kb274680 (in french) how to retrieve procedures and functions names of projects, but the method uses C++, which I do not have. Is there a way to do the same thing using VBA, from Excel VBIDE ? I need it to create more easily a customUI for Excel 2007 Ribbon. Thanks, -- Aeronav |
How to retrieve procedures ans functions names in VBA ?
This gets the active procedure name as long as these procs are in the same
module Sub testGAPM() Dim mpStartLine As Long Application.VBE.ActiveCodePane.GetSelection mpStartLine, 0, 0, 0 MsgBox GetActiveProcName(mpStartLine) End Sub Function GetActiveProcName(StartLine As Long) As String GetActiveProcName = Application.VBE.ActiveCodePane. _ CodeModule.ProcOfLine(StartLine, 0) End Function -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Aeronav" wrote in message ... Good morning, I am using WIN XP SP2 and Excel 2007 Microsoft explains in kb274680 (in french) how to retrieve procedures and functions names of projects, but the method uses C++, which I do not have. Is there a way to do the same thing using VBA, from Excel VBIDE ? I need it to create more easily a customUI for Excel 2007 Ribbon. Thanks, -- Aeronav |
All times are GMT +1. The time now is 03:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com