R
redhorse
I have a VBA project where there are some slides with code in them so that
they are listed in the project window under "Microsoft PowerPoint Objects" as
"Slide7" for example.
I would like to be able to call a sub on Slide7, which I am able to do by
making that sub public:
Public Sub MySubroutine()
And I can call it from any module using the following syntax:
Slide7.MySubroutine
To keep things logical and clear in my code, I have named most of my slides
so that I can refer to them in the following fashion:
ActivePresentation.Slides("MySlide")...
Is there any way I can call MySubroutine using a syntax that includes the
slide's name of "MySlide" rather than use "Slide7.MySubroutine"? I want to
make it clear in my code which slide I am calling the routine from, and
"Slide7" just isn't very helpful since it is not the 7th slide in my
presentation.
they are listed in the project window under "Microsoft PowerPoint Objects" as
"Slide7" for example.
I would like to be able to call a sub on Slide7, which I am able to do by
making that sub public:
Public Sub MySubroutine()
And I can call it from any module using the following syntax:
Slide7.MySubroutine
To keep things logical and clear in my code, I have named most of my slides
so that I can refer to them in the following fashion:
ActivePresentation.Slides("MySlide")...
Is there any way I can call MySubroutine using a syntax that includes the
slide's name of "MySlide" rather than use "Slide7.MySubroutine"? I want to
make it clear in my code which slide I am calling the routine from, and
"Slide7" just isn't very helpful since it is not the 7th slide in my
presentation.