Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / PowerPoint / April 2007



Tip: Looking for answers? Try searching our database.

Mac PPT VBA IDE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Rindsberg - 20 Apr 2007 20:52 GMT
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 MVP - 20 Apr 2007 23:49 GMT
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

Quoting from "Steve Rindsberg" <abuse@localhost.com>, in article
VA.000033a3.77b58972@localhost.com, on [DATE:

> Help a poor Windows-stupefied VBA addict.
>
[quoted text clipped - 29 lines]
> PPTools:  www.pptools.com
> ================================================

Signature

Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info http://mvp.support.microsoft.com/

Steve Rindsberg - 21 Apr 2007 20:49 GMT
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
PPT X.  At least I've gotten motivated to fix that. <g>

> -Jim Gordon
> Mac MVP
[quoted text clipped - 35 lines]
> > PPTools:  www.pptools.com
> > ================================================

================================================
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Jim Gordon MVP - 21 Apr 2007 22:16 GMT
Have you given thought to writing in Excel or Word VBE using OLE Automation
so you can paste it into RealBasic?

-Jim

Quoting from "Steve Rindsberg" <abuse@localhost.com>, in article
VA.000033aa.7cd919bf@localhost.com, on [DATE:

> Hi Jim,
>
[quoted text clipped - 97 lines]
> PPTools:  www.pptools.com
> ================================================

Signature

Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info http://mvp.support.microsoft.com/

Steve Rindsberg - 23 Apr 2007 02:56 GMT
> 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
>
[quoted text clipped - 102 lines]
> > PPTools:  www.pptools.com
> > ================================================

================================================
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.