PDA

Click to See Complete Forum and Search --> : VBA newbie, help required please *RESOLVED* (ish)


Simon Caiger
May 8th, 2003, 04:30 AM
I have dabbled with VBA in Excel before but now I need to do some more complex things in PowerPoint.

I would be grateful if somebody could answer these simple (I hope) questions :

1) As certain slides are loaded, I need to run some code. Sometimes this is immediately the slide is shown, other times it will be some period of time after the slide is shown. I have sussed how to create a timer but what I need to know is there some kind of Slide_Load event?
I am currently using a CommandButton on the slide but I would really like to automate the process.

2) UserForms seem to be some kind of VB Form object. Do these get displayed on the PowerPoint slide? If so, what is the display method (Show?).

3) Is there a PictureBox control available? Either to be displayed on a UserForm or preferrably on the slide.

Thanks in advance

alex_read
May 19th, 2003, 02:14 AM
Haven't got a clue with the first one, powerpoint like word is extremely crap when it comes to events completely different to excel or vb for some reason. Here's a couple of links I have in my favourites, I dunno if any are going to be usefule for you:

http://msdn.microsoft.com/library/default.asp?url=/code/list/powerpoint.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbapp10/html/ppevtSlideSelectionChanged.asp
http://officerone.tripod.com/vba.html

Q2 - A userform is very much like a standard vb form & it' an extra window sitting on the screen rather than embedded into a slide & I think the syntax is userformnam.show or userformnam.visible = true the same with a vb form.

Q3 - Nope, you have an image control, or you can download or make a custom picture usercontrol which you could add into the project, but powerpoint only supports the image control.

Simon Caiger
May 19th, 2003, 03:15 AM
Although your answers to my questions were disappointing :(
Thanks for the reply Alex :)

Looks like you are pretty restricted with what you can do with VBA in PowerPoint.

alex_read
May 19th, 2003, 03:19 AM
Yeah god knows why MS have done this - Excel is fine - each worksheet has events which you can call on as normal, if you try the same in powerpoint, your stuffed! :rolleyes: