Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA functions and Procedures.... Arif[_2_] Excel Worksheet Functions 1 June 3rd 08 10:27 AM
How do I retrieve the column names in a ADODB recordset from MS SQ MChrist Excel Programming 2 July 7th 05 01:44 PM
how to retrieve current values assigned for names used in EXCEL? yrk Excel Discussion (Misc queries) 3 June 10th 05 08:22 PM
Retrieve item names in ListBox Peter Jamieson[_2_] Excel Programming 3 July 5th 04 12:27 PM
Programatically retrieve a list of public functions. Alan Howells Excel Programming 4 October 21st 03 02:28 PM


All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"