VB beginner

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
It works so far.
How can I make sure it doesn't appear on the first slide (my login screen)?
Thank you!

Marion
 
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."?
 
Back
Top