show 1 picture and a copy, but hide others (vlookup)

Dozo2000

New Member
Joined
Dec 8, 2016
Messages
24
Hello,

I am trying to create an A3 sticker with options via VlookUp.

It is working, but I want it to be twice on the page so I can print 2 on an A4.
It only shows me the first or the last picture, but not both..

In cells I9 and I36 is a VerticalLookUp.
NamePicture Name
1Picture1
2Picture2
3Picture3
4Picture4

<tbody>
</tbody><colgroup><col span="3"></colgroup>


Code:
 Private Sub Worksheet_Calculate()
        Dim oPic As Picture
        Me.Pictures.Visible = False
        Sheets("B8-12  A3 ACTIE").Shapes("Dustco1").Visible = True
        Sheets("B8-12  A3 ACTIE").Shapes("Bullduster1").Visible = True
        Sheets("B8-12  A3 ACTIE").Shapes("Dustco2").Visible = True
        Sheets("B8-12  A3 ACTIE").Shapes("Bullduster2").Visible = True
        With Range("I9")
            For Each oPic In Me.Pictures
                If oPic.Name = .Text Then
                    oPic.Visible = True
                    oPic.Top = .Top
                    oPic.Left = .Left
                    Exit For
                End If
            Next oPic
        End With
        With Range("I36")
            For Each oPic In Me.Pictures
                If oPic.Name = .Text Then
                    oPic.Visible = True
                    oPic.Top = .Top
                    oPic.Left = .Left
                    Exit For
                End If
            Next oPic
        End With
    
    End Sub
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top