ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create an array based on the subroutines in a module (https://www.excelbanter.com/excel-programming/453146-create-array-based-subroutines-module.html)

Matthew Dyer

Create an array based on the subroutines in a module
 
here's an interesting thing... I have multiple closely related but specifically individual subroutines clustered in one module (Verbiage). I know that there is a way that VBA can pull out the subroutine names simply cuz when im in the VB editor, the (Declarations) dropdown box lists all of the subs in that module. How could I write VBA that builds an array that lists all of the subroutines in it?

Second Question:like you can use Inputbox() as a simple userform type thing to take in a variable, is there a Combobox() type thing that would list the items in the subroutine array? or do I need to go with a UserForm?

GS[_6_]

Create an array based on the subroutines in a module
 
here's an interesting thing... I have multiple closely related but
specifically individual subroutines clustered in one module
(Verbiage). I know that there is a way that VBA can pull out the
subroutine names simply cuz when im in the VB editor, the
(Declarations) dropdown box lists all of the subs in that module. How
could I write VBA that builds an array that lists all of the
subroutines in it?

Second Question:like you can use Inputbox() as a simple userform type
thing to take in a variable, is there a Combobox() type thing that
would list the items in the subroutine array? or do I need to go with
a UserForm?


Are you looking to duplicate what the Macros... dialog does? (CtrlF8)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

isabelle

Create an array based on the subroutines in a module
 
Garry, is it Alt F8 ?

isabelle

Le 2017-02-15 à 21:38, GS a écrit :
Are you looking to duplicate what the Macros... dialog does? (CtrlF8)



GS[_6_]

Create an array based on the subroutines in a module
 
Garry, is it Alt F8 ?

isabelle

Le 2017-02-15 à 21:38, GS a écrit :
Are you looking to duplicate what the Macros... dialog does?
(CtrlF8)


Yes, it s/b Alt+F8; -thanks for catching that! I have something similar
that I've assigned to Ctrl+F8 key combo and so typed it by mistake.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

Peter T[_7_]

Create an array based on the subroutines in a module
 

"Matthew Dyer" wrote in message
here's an interesting thing... I have multiple closely related but
specifically individual subroutines clustered in one module (Verbiage). I
know that there is a way that VBA can pull out the subroutine names simply
cuz when im in the VB editor, the (Declarations) dropdown box lists all of
the subs in that module. How could I write VBA that builds an array that
lists all of the subroutines in it?

Second Question:like you can use Inputbox() as a simple userform type thing
to take in a variable, is there a Combobox() type thing that would list the
items in the subroutine array? or do I need to go with a UserForm?

=====================================

Try the "Extended Project Explorer"
http://www.jkp-ads.com/Articles/treeview02.asp

That should more than give ideas for your first question, but I don't follow
your second.

Peter T



GS[_6_]

Create an array based on the subroutines in a module
 
Try the "Extended Project Explorer"
http://www.jkp-ads.com/Articles/treeview02.asp


Oh yeah.., I completely forgot about that project! (Not yet installed
on this new machine)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


All times are GMT +1. The time now is 09:39 PM.

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