VB beginner

M

marionvs

Hello,
I'm trying to start to make an interactive presentation slide show. The user
types his name on the first slide, and his name is repeated on each following
slide.
I'm trying to do this using following code:

Private Sub CommandButton1_Click()
Label1.Caption = " Welcom Mr: " + TextBox1.Text

ActivePresentation.Slides(2).Label1.Caption = " Welcom Mr: " + TextBox1.Text
End With
End Sub

But it doesn't work. Can anybody help me?
Thank you very much.
Regards,
Marion
 
J

John Wilson

Try this to add the massage to the master
Sub dothis()
Dim strname As String
strname = InputBox("Please enter your name")
With ActivePresentation.SlideMaster.HeadersFooters.Footer
..Text = "Welcome Mr. " & strname
..Visible = msoTrue
End With
End Sub
 
M

marionvs

It works so far.
How can I make sure it doesn't appear on the first slide (my login screen)?
Thank you!

Marion
 
J

John Wilson

Modified to turn off slide 1 and title the input box:

Sub dothis()
Dim strname As String
strname = InputBox("Please enter your name", "Name Entry")
With ActivePresentation.SlideMaster.HeadersFooters.Footer
..Text = "Welcome Mr. " & strname
..Visible = msoTrue
End With
ActivePresentation.Slides(1).HeadersFooters.Footer.Visible = msoFalse
End Sub

BTW Are you sure all the people are "Mr."?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top