Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2007

Tip: Looking for answers? Try searching our database.

scrollbar macro in powerpoint 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
karatemyth - 13 Aug 2007 19:54 GMT
so im using powerpoint 2007, and i want to use the scrollbar macro that
powerpoint provides for us; but wen i put it in, it does nothing; wat's the
correct way to use this scroll bar macro? also, i've set up action buttons,
wen clicked upon, that makes things move left and rite using motion paths;
however, it doesn't work out like a scroll bar, cuz i have to put in a
starting position for it to start; so it is flawed, and tht's y im using the
scroll bar macro
Steve Rindsberg - 13 Aug 2007 21:52 GMT
> so im using powerpoint 2007, and i want to use the scrollbar macro that
> powerpoint provides for us; but wen i put it in, it does nothing; wat's the
[quoted text clipped - 3 lines]
> starting position for it to start; so it is flawed, and tht's y im using the
> scroll bar macro

What scroll bar macro are you referring to?  
Where'd you find it?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
karatemyth - 21 Aug 2007 20:02 GMT
sry i dint even see ur reply
im talking bout the developer tab in microsoft powerpoint 2007
they give some objects to insert into the slide
these objects are the macros
when i put my mouse over the button, it tells me it says scrollbar macro
(activexcontrol)

> > so im using powerpoint 2007, and i want to use the scrollbar macro that
> > powerpoint provides for us; but wen i put it in, it does nothing; wat's the
[quoted text clipped - 12 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 22 Aug 2007 04:51 GMT
Ah, that.  The scrollbar control.

None of the controls from the control toolbox do anything unless you write code to
make them do it.  What do you want it to do?  

> sry i dint even see ur reply
> im talking bout the developer tab in microsoft powerpoint 2007
[quoted text clipped - 19 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
karatemyth - 22 Aug 2007 15:58 GMT
well i want to have objects move left and rite when i press those buttons
currently i have set up motion paths whose triggers are the left and rite
buttons
basically i want to have objects move left when i press left and objects
move rite wen i move rite
the problem i have wit the motion paths is that their in order; so when u
press rite, it moves rite, but wen u press left rite after that, it moves
left from a different position; in order for it to go smoothly wit the motion
paths, i have to press rite four times, then i can press left to make it look
smooth and normal when it moves

> Ah, that.  The scrollbar control.
>
[quoted text clipped - 30 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 22 Aug 2007 16:44 GMT
Something like this might do it:
(watch for line breaks)

Private Sub ScrollBar1_Change()
   Static LastValue As Single
   Dim IncrementAmount As Single
   
   IncrementAmount = 10    ' but change it to whatever you like
   
   Select Case Me.ScrollBar1.Value
       Case Is > LastValue
           ActivePresentation.Slides(1).Shapes("Rectangle 3").IncrementLeft (IncrementAmount)
       Case Is < LastValue
           ActivePresentation.Slides(1).Shapes("Rectangle 3").IncrementLeft (-IncrementAmount)
   End Select
   
   ' and remember the current value for future comparisons
   LastValue = Me.ScrollBar1.Value
   
End Sub

> well i want to have objects move left and rite when i press those buttons
> currently i have set up motion paths whose triggers are the left and rite
[quoted text clipped - 41 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
karatemyth - 04 Sep 2007 23:24 GMT
ill try it out
but again, im not good wit vba

> Something like this might do it:
> (watch for line breaks)
[quoted text clipped - 68 lines]
> PPTools:  www.pptools.com
> ================================================
karatemyth - 05 Sep 2007 00:00 GMT
i want textboxes to moves left and rite wen i click left and rite
so i tried entering textbox 1 where rectangle 1 was, and it dint work
is it supposed to work? then it couldve been a typo on my part
unless there is another code for moving textboxes
also, can u use that same code but for a different object?
say if i designed my own button, can i make it do just that?

> Something like this might do it:
> (watch for line breaks)
[quoted text clipped - 68 lines]
> PPTools:  www.pptools.com
> ================================================
karatemyth - 05 Sep 2007 00:08 GMT
meaning that i want to substitute the scrollbar for an object that i designed
myself

> i want textboxes to moves left and rite wen i click left and rite
> so i tried entering textbox 1 where rectangle 1 was, and it dint work
[quoted text clipped - 75 lines]
> > PPTools:  www.pptools.com
> > ================================================
Steve Rindsberg - 06 Sep 2007 16:46 GMT
You mention also that you want this to happen with objects that you've created, rather than with a
scrollbar.  That's not the same problem, so of course the answer won't work.

Suppose we start over ... please describe exactly what you want to do here.  
Normal spelling and punctuation would be helpful too.  VBA won't let you use shorthand; may as well
get into practice by avoiding it here too.  Easier to understand.

Thanks.

> i want textboxes to moves left and rite wen i click left and rite
> so i tried entering textbox 1 where rectangle 1 was, and it dint work
[quoted text clipped - 75 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
karatemyth - 06 Sep 2007 21:48 GMT
Good Idea.
Alright, So I have one long rectangle and objects above and below it. As I
click left, the objects and rectangle should move left and vice versa. I have
the long rectangle increase in size and change positions as effects at the
beginning of the slide. Then the other objects around the long rectangle zoom
in. As the same time all this zooms in, the Left and Right control buttons
zoom in. After all this, I want to move all these object left and right from
the position the effects place them in. Alright, I think I got everything. Is
there anything you still want me to clear up?

> You mention also that you want this to happen with objects that you've created, rather than with a
> scrollbar.  That's not the same problem, so of course the answer won't work.
[quoted text clipped - 90 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 07 Sep 2007 03:42 GMT
> Good Idea.
> Alright, So I have one long rectangle and objects above and below it. As I
[quoted text clipped - 5 lines]
> the position the effects place them in. Alright, I think I got everything. Is
> there anything you still want me to clear up?

OK, the animation stuff isn't relevant to the VBA, is it?  
Hey, I asked for thorough, you gave me thorough ... I'm not complaining! <g>

For starters, you'll want to make two rectangles rather than one, if you want to distinguish between
clicks on one side and the other.

Let's call the left one Decrease and the right one Increase

Add this macro to your project and make the Increase rectangle's action setting Run Macro: Increase

Sub Increase()
  Dim IncrementAmount as Single
  IncrementAmount = 10 ' but change it to what you want
  ActivePresentation.Slides(1).Shapes("Rectangle 3").IncrementLeft (IncrementAmount)  
End Sub

Do the same with the decrease rectangle only make it run this

Sub Decrease()
  Dim IncrementAmount as Single
  IncrementAmount = 10 ' but change it to what you want
  ActivePresentation.Slides(1).Shapes("Rectangle 3").IncrementLeft (-IncrementAmount)
End Sub

In both of the above:
Change the .Slides(1) to .Slides(x) where x = the number of the slide this all happens on.
Change "Rectangle 3" to whatever the name of the shape is.
To move more shapes, duplicate the same line and change the name of the shape as needed.

-----------------------------------------
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.