Question : can I copy a picture in the header section into another left header section of another sheet in the same workbook?

Hi There,

 If there is anyway that I can copy a picture that it is already in the header section of a sheet into a header section of another sheet?

 Thanks,

 alopez

Answer : can I copy a picture in the header section into another left header section of another sheet in the same workbook?

... or the mor3e comfortable version which selcts a pcture file and inserts it in all worksheets:

Function SelectPictureFile() As String
    Dim varFilename As Variant
    varFilename = Application.GetOpenFilename _
       ("Picturefiles (*.bmp;*.gif;*.jpg;*.tif;*.wmf),.bmp;.gif;.jpg;.tif;.wmf")
    If varFilename = False Then
        SelectPictureFile = ""
    Else
        SelectPictureFile = varFilename
    End If
End Function


Sub SelectAndSetPicture()
   
    Dim oSht As Object
    Dim strPictureFile As String
   
    strPictureFile = SelectPictureFile
    If strPictureFile = "" Then Exit Sub
   
    For Each oSht In ActiveWorkbook.Sheets
        With oSht.PageSetup
            .LeftHeaderPicture.Filename = strPictureFile
            .LeftHeader = "&G"
        End With
    Next sht
End Sub


Have Fun!

Xanius
Random Solutions  
 
programming4us programming4us