How to list macro names in a combo box or a list 
Author Message
 How to list macro names in a combo box or a list

Hi everyone,

Is there someone who knows how to list macro names in a combo box or a list
box?

For example, with the code below I can list all my style names in a combo
box:

Private Sub UserForm_Initialize()
   For Each sty In ActiveDocument.Styles
       ComboBox1.AddItem (sty)
   Next sty
Next Sub

How to do the same with macro names?

Thank you all in advance.

Edson Furman



Fri, 24 Sep 2004 07:13:10 GMT  
 How to list macro names in a combo box or a list
You have to add the reference to VBIDE type library ("Microsoft Visual Basic
for Application Extensibility") in your VBA-project and make some
programming with its objects.

With best regards,
Vladimir Korol

Quote:
> Hi everyone,

> Is there someone who knows how to list macro names in a combo box or a
list
> box?

> For example, with the code below I can list all my style names in a combo
> box:

> Private Sub UserForm_Initialize()
>    For Each sty In ActiveDocument.Styles
>        ComboBox1.AddItem (sty)
>    Next sty
> Next Sub

> How to do the same with macro names?

> Thank you all in advance.

> Edson Furman




Fri, 24 Sep 2004 20:41:21 GMT  
 How to list macro names in a combo box or a list
Thank you Vladmir,
Following your tip, I solved the problem with this sample macro:
WD2000: Macro Example to Return Macro and Procedure Names (Q262961)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q262961

[],
Edson Furman



Quote:
> You have to add the reference to VBIDE type library ("Microsoft Visual
Basic
> for Application Extensibility") in your VBA-project and make some
> programming with its objects.

> With best regards,
> Vladimir Korol


> > Hi everyone,

> > Is there someone who knows how to list macro names in a combo box or a
> list
> > box?

> > For example, with the code below I can list all my style names in a
combo
> > box:

> > Private Sub UserForm_Initialize()
> >    For Each sty In ActiveDocument.Styles
> >        ComboBox1.AddItem (sty)
> >    Next sty
> > Next Sub

> > How to do the same with macro names?

> > Thank you all in advance.

> > Edson Furman




Sat, 25 Sep 2004 05:53:38 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to list macro names in a combo box or a list box

2. How to list macro names in a combo box or a list

3. Listing all tables or queries in a list/combo box

4. Rebuild select list for combo/list box

5. Use list from excel or access to populate combo/list box

6. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

7. Updating a combo box list W/limit to list selected

8. Adding the alphabet in a list box or combo list

9. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

10. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

11. Automatically placing list of table names in to a combo box

12. name of one list item is longer than the width of the list box

 

 
Powered by phpBB® Forum Software