I am trying to get information entered in a powerpoint by the user, through a
visual basic text box, to carry from one slide to the next. I cannot seem to
get it. I can get information to carry from one textbox to another on the
same slide, just not from one slide to another. Any suggestions.

RE: Powerpoint textbox copy from slide to slide by john

john
Thu May 08 16:09:01 CDT 2008

Maybe if you post the code you are trying ....
--
-------------------------------------------
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk


"sccrgod" wrote:

> I am trying to get information entered in a powerpoint by the user, through a
> visual basic text box, to carry from one slide to the next. I cannot seem to
> get it. I can get information to carry from one textbox to another on the
> same slide, just not from one slide to another. Any suggestions.

RE: Powerpoint textbox copy from slide to slide by sccrgod

sccrgod
Thu May 08 16:32:32 CDT 2008

I got all the code I am using I got from the help files. It has been 10 plus
years since I used VB, so I don't remember much.

Here is the code that works:


Dim MyData As DataObject

Private Sub CommandButton1_Click()
'Need to select text before copying it to Clipboard
TextBox1.SelStart = 0
TextBox1.SelLength = TextBox1.TextLength
TextBox1.Copy
Set MyData = New DataObject
MyData.GetFromClipboard
TextBox2.Text = MyData.GetText(1)
End Sub

Private Sub UserForm_Initialize()


End Sub

Private Sub TextBox1_Change()

End Sub

Private Sub TextBox13_Change()

End Sub

Private Sub TextBox3_Change()

End Sub

Private Sub TextBox4_Change()

End Sub

Here is the code that doesn't quite work. It doesn't seem to copy to the
clipboard.

Dim MyData As DataObject


Private Sub CommandButton1_Click()

'Need to select text before copying it to Clipboard
With ActivePresentation
.Slides(2).TextBox1.SelStart = 0
.Slides(2).TextBox1.SelLength = TextBox1.TextLength
.Slides(2).TextBox1.Copy

Set MyData = New DataObject
MyData.GetFromClipboard
.Slides(3).Shapes.Range(Array(2)).TextBox2.Text = MyData.GetText(1)
End With
End Sub

Private Sub UserForm_Initialize()

TextBox1.Text = "Move this data to the " _
& "Clipboard, to a DataObject, then to "
& "TextBox2!"


End Sub


Private Sub TextBox1_Change()

End Sub



Private Sub TextBox2_Change()

End Sub

"John Wilson" wrote:

> Maybe if you post the code you are trying ....
> --
> -------------------------------------------
> Amazing PPT Hints, Tips and Tutorials
>
> http://www.PPTAlchemy.co.uk
> http://www.technologytrish.co.uk
> email john AT technologytrish.co.uk
>
>
> "sccrgod" wrote:
>
> > I am trying to get information entered in a powerpoint by the user, through a
> > visual basic text box, to carry from one slide to the next. I cannot seem to
> > get it. I can get information to carry from one textbox to another on the
> > same slide, just not from one slide to another. Any suggestions.

RE: Powerpoint textbox copy from slide to slide by john

john
Fri May 09 06:48:00 CDT 2008

Try this sort of thing:

Assuming both textboxes have the default name and the target textbox is on
slide 2.

Dim strtextin As String
Private Sub CommandButton1_Click()
'current slide in show
strtextin = ActivePresentation.SlideShowWindow.View.Slide _
.Shapes("TextBox1").OLEFormat _
.Object.Text
'target (assumes slide 2)
ActivePresentation.Slides(2).Shapes("TextBox1").OLEFormat _
.Object.Text = strtextin
End Sub--
-------------------------------------------
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk


"sccrgod" wrote:

> I got all the code I am using I got from the help files. It has been 10 plus
> years since I used VB, so I don't remember much.
>
> Here is the code that works:
>
>
> Dim MyData As DataObject
>
> Private Sub CommandButton1_Click()
> 'Need to select text before copying it to Clipboard
> TextBox1.SelStart = 0
> TextBox1.SelLength = TextBox1.TextLength
> TextBox1.Copy
> Set MyData = New DataObject
> MyData.GetFromClipboard
> TextBox2.Text = MyData.GetText(1)
> End Sub
>
> Private Sub UserForm_Initialize()
>
>
> End Sub
>
> Private Sub TextBox1_Change()
>
> End Sub
>
> Private Sub TextBox13_Change()
>
> End Sub
>
> Private Sub TextBox3_Change()
>
> End Sub
>
> Private Sub TextBox4_Change()
>
> End Sub
>
> Here is the code that doesn't quite work. It doesn't seem to copy to the
> clipboard.
>
> Dim MyData As DataObject
>
>
> Private Sub CommandButton1_Click()
>
> 'Need to select text before copying it to Clipboard
> With ActivePresentation
> .Slides(2).TextBox1.SelStart = 0
> .Slides(2).TextBox1.SelLength = TextBox1.TextLength
> .Slides(2).TextBox1.Copy
>
> Set MyData = New DataObject
> MyData.GetFromClipboard
> .Slides(3).Shapes.Range(Array(2)).TextBox2.Text = MyData.GetText(1)
> End With
> End Sub
>
> Private Sub UserForm_Initialize()
>
> TextBox1.Text = "Move this data to the " _
> & "Clipboard, to a DataObject, then to "
> & "TextBox2!"
>
>
> End Sub
>
>
> Private Sub TextBox1_Change()
>
> End Sub
>
>
>
> Private Sub TextBox2_Change()
>
> End Sub
>
> "John Wilson" wrote:
>
> > Maybe if you post the code you are trying ....
> > --
> > -------------------------------------------
> > Amazing PPT Hints, Tips and Tutorials
> >
> > http://www.PPTAlchemy.co.uk
> > http://www.technologytrish.co.uk
> > email john AT technologytrish.co.uk
> >
> >
> > "sccrgod" wrote:
> >
> > > I am trying to get information entered in a powerpoint by the user, through a
> > > visual basic text box, to carry from one slide to the next. I cannot seem to
> > > get it. I can get information to carry from one textbox to another on the
> > > same slide, just not from one slide to another. Any suggestions.

RE: Powerpoint textbox copy from slide to slide by sccrgod

sccrgod
Fri May 09 14:27:00 CDT 2008

Thanks it worked great.

"John Wilson" wrote:

> Try this sort of thing:
>
> Assuming both textboxes have the default name and the target textbox is on
> slide 2.
>
> Dim strtextin As String
> Private Sub CommandButton1_Click()
> 'current slide in show
> strtextin = ActivePresentation.SlideShowWindow.View.Slide _
> .Shapes("TextBox1").OLEFormat _
> .Object.Text
> 'target (assumes slide 2)
> ActivePresentation.Slides(2).Shapes("TextBox1").OLEFormat _
> .Object.Text = strtextin
> End Sub--
> -------------------------------------------
> Amazing PPT Hints, Tips and Tutorials
>
> http://www.PPTAlchemy.co.uk
> http://www.technologytrish.co.uk
> email john AT technologytrish.co.uk
>
>
> "sccrgod" wrote:
>
> > I got all the code I am using I got from the help files. It has been 10 plus
> > years since I used VB, so I don't remember much.
> >
> > Here is the code that works:
> >
> >
> > Dim MyData As DataObject
> >
> > Private Sub CommandButton1_Click()
> > 'Need to select text before copying it to Clipboard
> > TextBox1.SelStart = 0
> > TextBox1.SelLength = TextBox1.TextLength
> > TextBox1.Copy
> > Set MyData = New DataObject
> > MyData.GetFromClipboard
> > TextBox2.Text = MyData.GetText(1)
> > End Sub
> >
> > Private Sub UserForm_Initialize()
> >
> >
> > End Sub
> >
> > Private Sub TextBox1_Change()
> >
> > End Sub
> >
> > Private Sub TextBox13_Change()
> >
> > End Sub
> >
> > Private Sub TextBox3_Change()
> >
> > End Sub
> >
> > Private Sub TextBox4_Change()
> >
> > End Sub
> >
> > Here is the code that doesn't quite work. It doesn't seem to copy to the
> > clipboard.
> >
> > Dim MyData As DataObject
> >
> >
> > Private Sub CommandButton1_Click()
> >
> > 'Need to select text before copying it to Clipboard
> > With ActivePresentation
> > .Slides(2).TextBox1.SelStart = 0
> > .Slides(2).TextBox1.SelLength = TextBox1.TextLength
> > .Slides(2).TextBox1.Copy
> >
> > Set MyData = New DataObject
> > MyData.GetFromClipboard
> > .Slides(3).Shapes.Range(Array(2)).TextBox2.Text = MyData.GetText(1)
> > End With
> > End Sub
> >
> > Private Sub UserForm_Initialize()
> >
> > TextBox1.Text = "Move this data to the " _
> > & "Clipboard, to a DataObject, then to "
> > & "TextBox2!"
> >
> >
> > End Sub
> >
> >
> > Private Sub TextBox1_Change()
> >
> > End Sub
> >
> >
> >
> > Private Sub TextBox2_Change()
> >
> > End Sub
> >
> > "John Wilson" wrote:
> >
> > > Maybe if you post the code you are trying ....
> > > --
> > > -------------------------------------------
> > > Amazing PPT Hints, Tips and Tutorials
> > >
> > > http://www.PPTAlchemy.co.uk
> > > http://www.technologytrish.co.uk
> > > email john AT technologytrish.co.uk
> > >
> > >
> > > "sccrgod" wrote:
> > >
> > > > I am trying to get information entered in a powerpoint by the user, through a
> > > > visual basic text box, to carry from one slide to the next. I cannot seem to
> > > > get it. I can get information to carry from one textbox to another on the
> > > > same slide, just not from one slide to another. Any suggestions.