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.
[TABLE="width: 192"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Picture Name[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Picture1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Picture2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Picture3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Picture4[/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col span="3"></colgroup>[/TABLE]


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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,224,811
Messages
6,181,082
Members
453,021
Latest member
Justyna P

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