Using VBA to insert different headers

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
1,121
I have a start up page for my spreadsheet that allows a user and a site to be selected. Depending on the user, I want a signature that is stored on the sheet Users, inserted in the following format onto sheet1. The signatures are stored in sheet 2.

Code:
    Dim shp As Shape
    Set shp = Sheets("sheet1").Shapes("textbox4")
        Sheets("Sheet2").Shapes("ImgG").Copy
        Sheets("sheet1").Paste Destination:=Sheets("sheet1").Cells(1, 1)
        Selection.Top = shp.Top + shp.Height + "50"

Can someone help me with the vba please?
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,182
Code:
    [color=darkblue]Dim[/color] shp [color=darkblue]As[/color] Shape
    [color=darkblue]Set[/color] shp = Sheets("Sheet1").Shapes("textbox4")
    Sheets("Sheet2").Shapes("ImgG").Copy
    Application.Goto Sheets("Sheet1").Cells(1, 1)
    Sheets("Sheet1").Paste
    Selection.Top = shp.Top + shp.Height + 50
 

Forum statistics

Threads
1,084,777
Messages
5,379,829
Members
401,630
Latest member
lisa83rtt

Some videos you may like

This Week's Hot Topics

Top