Mac PPT VBA IDE

S

Steve Rindsberg

Help a poor Windows-stupefied VBA addict.

When I open the VBA IDE in PPT Mac, it insists on flipping open every single
module in every open presentation and/or add-in that it can find. Depending on
what I'm doing, that may mean thirty or more windows. It's maddening to have
to plow through all of that.

The Windows version opens any modules I doubleclick (ie, only what I ask to
have opened).

Any way to change the Mac IDE's behavior? No points awarded for "Run Windows
PPT under Parallels" ;-)

===

And I'm probably just missing something basic, but is there a good way to swap
back and forth between PPT and the IDE? On the PC it's a matter of clicking
the one you want on the task bar, but the Mac version doesn't seem to make this
possible. As it is, I keep having to dismiss the IDE (File, Close and return
to PowerPoint) which inevitably leaves a few code windows lying about. And
then to get back into the IDE, we have to wade through the blizzard o' code
windows it opens up again. Surely I'm missing some simple, elegant and far
better way ...

===




================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
J

Jim Gordon MVP

Hi Steve,

I'm not seeing the behavior your describe, but I suppose maybe you could
write a macro that closes all the open module windows.

Visible Property Example (from PowerPoint VBE help)
The following example uses the Visible property to return a Boolean value
indicating whether or not the specified window is visible.
Debug.Print Application.VBE.Windows(9).Visible
Returns or sets a Boolean value that specifies the visibility of a window.
Read/write.

When in the IDE you can:
use Apple+Q from the keyboard to return to PowerPoint
Click the View Microsoft PowerPoint button on the toolbar
Click on any screen element of the regular PowerPoint view (code that's
running will still be trying to execute)

There's an itty-bitty toolbar you can use to quickly access the VBE from
PowerPoint. View > Toolbars > Visual Basic.

The VBA IDE is programmable. Oddly enough the whole thing is documented in
the visual basic help system. Here's a tidbit:

VBE Object
The root object that contains all other objects and collections represented
in Visual Basic for Applications.
Remarks
You can use the following collections to access the objects contained in the
VBE object:
€ Use the VBProjects collection to access the collection of projects.
€ Use the Windows collection to access the collection of windows.
€ Use the CodePanes collection to access the collection of code panes.
€ Use the CommandBars collection to access the collection of command
barsUse the Events object to access properties that enable add-ins to
connect to all events in Visual Basic for Applications. The properties of
the Events object return objects of the same type as the property name. For
example, the CommandBarEvents property returns the CommandBarEvents object.
You can use the SelectedVBComponent property to return the active component.
The active component is the component that is being tracked in the Project
window. If the selected item in the Project window isn't a component,
SelectedVBComponent returns Nothing.
Note All objects in this object model have a VBE property that points to
the VBE object.

I feel so guilty telling my favorite VBA guru to check the help files.
Please forgive me.

-Jim Gordon
Mac MVP


Help a poor Windows-stupefied VBA addict.

When I open the VBA IDE in PPT Mac, it insists on flipping open every single
module in every open presentation and/or add-in that it can find. Depending
on
what I'm doing, that may mean thirty or more windows. It's maddening to have
to plow through all of that.

The Windows version opens any modules I doubleclick (ie, only what I ask to
have opened).

Any way to change the Mac IDE's behavior? No points awarded for "Run Windows
PPT under Parallels" ;-)

===

And I'm probably just missing something basic, but is there a good way to swap
back and forth between PPT and the IDE? On the PC it's a matter of clicking
the one you want on the task bar, but the Mac version doesn't seem to make
this
possible. As it is, I keep having to dismiss the IDE (File, Close and return
to PowerPoint) which inevitably leaves a few code windows lying about. And
then to get back into the IDE, we have to wade through the blizzard o' code
windows it opens up again. Surely I'm missing some simple, elegant and far
better way ...

===




================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 
S

Steve Rindsberg

Hi Jim,
I'm not seeing the behavior your describe,

You've trained yourself to close your eyes when launching VBA, hey? ;-)

It may be different in 2004; I'll have a look at that, but since this has to run
in X as well, I'm doing my dev work there.
but I suppose maybe you could
write a macro that closes all the open module windows.

Hmm. Not a bad idea. I was just hoping there was some IDE property I'd missed.
But your other tip has solved the problem, I think. Or at least mostly. Read on
...
When in the IDE you can:
use Apple+Q from the keyboard to return to PowerPoint

BLESS you.
Click on any screen element of the regular PowerPoint view (code that's
running will still be trying to execute)

With 48 code windows open, it takes an archeological expedition to locate the PPT
window. ;-)

But after returning to PPT via Apple+Q, when I go back to the IDE (which I haven't
had to close, ya see), it doesn't reopen all the code modules.

Happy Happy Happy.

Thanks!
I feel so guilty telling my favorite VBA guru to check the help files.
Please forgive me.

<g> It seems that everything else I've looked up in Help has been wrong (or right
for Windows PPT but not edited for Mac), so Help tends not to be my first Turn-To
source of ... well ... help.

And until I did some surgery on it t'other day, VBA help wasn't even working in
-Jim Gordon
Mac MVP

================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
J

Jim Gordon MVP

Have you given thought to writing in Excel or Word VBE using OLE Automation
so you can paste it into RealBasic?

-Jim


Hi Jim,


You've trained yourself to close your eyes when launching VBA, hey? ;-)

It may be different in 2004; I'll have a look at that, but since this has to
run
in X as well, I'm doing my dev work there.


Hmm. Not a bad idea. I was just hoping there was some IDE property I'd
missed.
But your other tip has solved the problem, I think. Or at least mostly. Read
on
..



BLESS you.


With 48 code windows open, it takes an archeological expedition to locate the
PPT
window. ;-)

But after returning to PPT via Apple+Q, when I go back to the IDE (which I
haven't
had to close, ya see), it doesn't reopen all the code modules.

Happy Happy Happy.

Thanks!


<g> It seems that everything else I've looked up in Help has been wrong (or
right
for Windows PPT but not edited for Mac), so Help tends not to be my first
Turn-To
source of ... well ... help.

And until I did some surgery on it t'other day, VBA help wasn't even working
in


================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 
S

Steve Rindsberg

Jim Gordon MVP said:
Have you given thought to writing in Excel or Word VBE using OLE Automation
so you can paste it into RealBasic?

For Office 2008? I've definitely given it thought but not sure whether I'll go
anywhere with it.


-Jim

Hi Jim,
I'm not seeing the behavior your describe,

You've trained yourself to close your eyes when launching VBA, hey? ;-)

It may be different in 2004; I'll have a look at that, but since this has to
run
in X as well, I'm doing my dev work there.
but I suppose maybe you could
write a macro that closes all the open module windows.

Hmm. Not a bad idea. I was just hoping there was some IDE property I'd
missed.
But your other tip has solved the problem, I think. Or at least mostly. Read
on
..

When in the IDE you can:
use Apple+Q from the keyboard to return to PowerPoint

BLESS you.
Click on any screen element of the regular PowerPoint view (code that's
running will still be trying to execute)

With 48 code windows open, it takes an archeological expedition to locate the
PPT
window. ;-)

But after returning to PPT via Apple+Q, when I go back to the IDE (which I
haven't
had to close, ya see), it doesn't reopen all the code modules.

Happy Happy Happy.

Thanks!
I feel so guilty telling my favorite VBA guru to check the help files.
Please forgive me.

<g> It seems that everything else I've looked up in Help has been wrong (or
right
for Windows PPT but not edited for Mac), so Help tends not to be my first
Turn-To
source of ... well ... help.

And until I did some surgery on it t'other day, VBA help wasn't even working
in
-Jim Gordon
Mac MVP

Quoting from "Steve Rindsberg" <[email protected]>, in article
(e-mail address removed), on [DATE:


Help a poor Windows-stupefied VBA addict.

When I open the VBA IDE in PPT Mac, it insists on flipping open every single
module in every open presentation and/or add-in that it can find. Depending
on
what I'm doing, that may mean thirty or more windows. It's maddening to
have
to plow through all of that.

The Windows version opens any modules I doubleclick (ie, only what I ask to
have opened).

Any way to change the Mac IDE's behavior? No points awarded for "Run
Windows
PPT under Parallels" ;-)

===

And I'm probably just missing something basic, but is there a good way to
swap
back and forth between PPT and the IDE? On the PC it's a matter of clicking
the one you want on the task bar, but the Mac version doesn't seem to make
this
possible. As it is, I keep having to dismiss the IDE (File, Close and
return
to PowerPoint) which inevitably leaves a few code windows lying about. And
then to get back into the IDE, we have to wade through the blizzard o' code
windows it opens up again. Surely I'm missing some simple, elegant and far
better way ...

===




================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top