Consulting

Results 1 to 4 of 4

Thread: A cool PowerPoint macro for testing

  1. #1
    VBAX Regular
    Joined
    Oct 2006
    Posts
    12
    Location

    A cool PowerPoint macro for testing

    I have written a cool PowerPoint macro for learning the oeuvre of famous painters. I have tested it only on my PC, and would like to find out if it runs smoothly on any PC. The macro uses a custom toolbar named ArtDrill. I couldn't find any way to attach this toolbar to the file, the same way you can do it for example in Word. Maybe this is a default option with PowerPoint, that’s why you can’t access this feature, though I have doubts in this regard. I couldn't even find a way to create a custom toolbar on opening the file, because PowerPoint does not support any command that runs a macro on start-up. The macro in question has been created in PowerPoint 2003. Are there any chances that it will run on the XP version as well? But if it works with PowerPoint 2003, or later, on an average computer, it will be great. I have never used this forum for testing; I hope I’ll be able to upload a couple of pictures together with the program file, to facilitate the testing. There will be a Word file with the instructions for use, too. The program is quite simple to use, testing it shouldn't take more than a couple of minutes. To test the timer function takes longer, however, but it runs in the background, you can work on something else in the meantime. I would be very grateful if someone could test my program named ArtDrill.

  2. #2
    VBAX Newbie
    Joined
    Jul 2008
    Posts
    3
    Location
    v good

  3. #3
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    You can only add toolbars from an auto_open macro which must be in a .ppa add in file. Theres a lot of help on Steve Rindsberg's site http://www.pptfaq.com in the programming section.

    Few points

    Your Dim statements don't do what you think!

    eg
    [vba]Dim pn, res, sure As String[/vba]
    Only sets sure as a string and the others will be variants. Likewise the the other Dim statements

    You should always use:
    [vba]Dim ps as string, res as string, sure as string[/vba]

    (In your case though res is an Integer and also fp is a string, dp and bp should really be longs but you are unlikely to go beyond 255 here)

    Animation settings though maybe easier to understand is left over from PowerPoint 2000. You should really use the Timeline in 2002/3 which gives you access to all of the new animation effects. Shyam Pillai has a tutorial on his site. (I can see you know where that is!)

    eg

    [vba]Dim oeff as effect
    Set oeff = .TimeLine.MainSequence.AddEffect(Shapes(2), msoAnimEffectZoom, , msoAnimTriggerOnPageClick)[/vba]

    Good luck with the project

    Regard John
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  4. #4
    VBAX Regular
    Joined
    Oct 2006
    Posts
    12
    Location
    Thank you a lot for the tips. I would have gone on with dimensioning my variables the wrong way forever, without your hint. I haven't been here for quite long, so sorry if I didn't react straight away; something with my e-mail notification is gone wrong, I reckon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •