PDA

View Full Version : [SOLVED:] Move Textbox in a slideshow



Mattthompson
12-02-2017, 07:29 AM
Hello,

I want to move a textbox from one position to another on a slide in a slideshow.
Actually it works and a new textbox appears at the new position, but the original textbox stays always at the origin position.
So there are two of them.
When I end the slideshow there is again only one textbox at the last chosen position.

In the slide I implemented two rectangles hyperlinked to one of the following subs.

Sub move_Left()
Me.Textbox.Left = 200
End Sub

Sub move_Right()
Me.Textbox.Left = 800
End Sub

I tried to realize a similar functionality by using the mouse_down command of the textbox, too.
But this leads to the same behavior.
Here, you must always click on the original textbox, which stays at the origin position to change the position.

Do you have an idea why this happens and how I can solve it?

Thank you for help!

John Wilson
12-02-2017, 10:50 AM
Are these ActivX textboxes or Rectangles??

Mattthompson
12-03-2017, 04:48 AM
There are two scenarios. The first one goes until the end of the code in #1:
The 'buttons' to control the moving are rectangles, but the form that is moved is an ActivX textbox.

The second one:
There is only one ActivX textbox using the mouse_down command.

John Wilson
12-03-2017, 07:49 AM
You probably need to redraw the slide



Sub redraw()Dim CP As Long
CP = SlideShowWindows(1).View.CurrentShowPosition
SlideShowWindows(1).View.GotoSlide (CP), ResetSlide:=True
End Sub

Mattthompson
12-03-2017, 09:52 AM
Thanks! It works.
I think, this is the base idea for doing drag&drop stuff.
Or do you have another better idea?

John Wilson
12-03-2017, 01:20 PM
Obviously we do as we have a commercial dragnDrop AddIn (http://www.pptalchemy.co.uk/Powerpoint_drag_and_drop.html) but we do not share the code.