Your code works. It's doing exactly what you asked it to do (which may differ from what you expect...), when you
Dim Header1 as String
You create a string variable, capable of holding a string data.
Then you assign to it:
Header1 = "test" 'Titel on the first slide
Nowhere in your code have you even attempted to use this string to write to a slide's title. you need to assign this to the slide's title object.
Header1 = "test"
Dim sldTitle as Object
If Not ppSlide.Shapes.HasTitle Then
'If there is no title object then assume the slideLayout does not permit one
' so do nothing.
Else:
Set myTitle = ppSlide.Shapes.Title
'Assign the title text:
myTitle.TextFrame.TextRange.Characters.Text = Header1
End If
This will come in handy for you:
http://msdn.microsoft.com/en-us/library/office/ff743835(v=office.14).aspx