Re: In slide edit, click an image to run a VBA routine
- From: "Shyam Pillai" <ShyamPillai@xxxxxxxxx>
- Date: Fri, 21 Nov 2008 08:18:04 -0800
In addition to what Steve said. If you are using the event handling approach then
- Keep the event handling code to the minimum.
- Turn the event handling off while you are processing the event and reset it back when done.
- You may run into an issue where the shape will move around as you move your cursor after the macro is done running. To work around this either unselect the shape programmatically or switch views and restore back.
Regards,
Shyam Pillai
Animation Carbon - http://www.animationcarbon.com
"Steve Rindsberg" <abuse@xxxxxxxxxxxxx> wrote in message news:VA.00004642.4d23cae0@xxxxxxxxxxxxxxxx
In article <B6757F32-BC96-4473-A35D-C72E868DB20F@xxxxxxxxxxxxx>, Lars wrote:I must develop a VBA routine that will open a user form when I click on any
one of several images on an existing slide (not the Slide Master), while in
edit mode. The user form allows me to select another image from a folder and,
when validating by OK, replaces the picture in the image control by the new
one. VBA code attached to an image control runs when in SlideView mode but
not in Edit mode. Can anyone give me some pointers ? Any help will be MOST
appreciated !
To expand on John's suggestion, you'll want to create an add-in that adds a menu
item or toolbar/buttons; when you choose these to invoke your code, it would
work on the current selection to do what you're after.
You'd want it to do some validation first ... make sure that there's only one
shape selected, that it's the correct type of shape and so on.
Another approach would be to write an add-in that implements an event handler:
Make PPT respond to events
http://www.pptfaq.com/FAQ00004.htm
You could respond to the SelectionChanged event; do nothing if the current
selection isn't one of your "target" shapes, or invoke your form and run your
code if it is.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
.
- Follow-Ups:
- References:
- In slide edit, click an image to run a VBA routine
- From: Lars
- Re: In slide edit, click an image to run a VBA routine
- From: Steve Rindsberg
- In slide edit, click an image to run a VBA routine
- Prev by Date: Re: MACRO for dual screen screen captures pasted into PPT.
- Next by Date: Very Large File Size?
- Previous by thread: Re: In slide edit, click an image to run a VBA routine
- Next by thread: Re: In slide edit, click an image to run a VBA routine
- Index(es):
Relevant Pages
|