Hi, I'm having a runtime error 438 with the line below. I posted the entire code for reference. I'm trying to write a macro that will be called uppon by other subs and the location of the logo will be in either the header or footer and in the left right or center location. any help to as what i did wrong would be awesome.

Thanks,

Chris


With SheetNum.PageSetup.PicLoc
Sub InsertPicture()

Dim SheetNum As Worksheet
Dim PicLoc As String
Dim temp As String

Set SheetNum = Sheet12
PicLoc = "CenterHeaderPicture"
   
    On Error GoTo Errhandler
        With SheetNum.PageSetup.PicLoc
            .Filename = LogoC
            .Height = 51
            '.Width = 100
            .Brightness = 0.5
            .ColorType = msoPictureAutomatic
            .Contrast = 0.5
            .CropBottom = 0
            .CropLeft = 0
            .CropRight = 0
            .CropTop = 0
        End With
    
        ' Enable the image to show up in the left header.
        SheetNum.PageSetup.PicLoc = "&G"
    Exit Sub
    
Errhandler:
    
MsgBox "Error"

End Sub