Edit a VB to Vlookup a picture

CraigFord

New Member
Joined
Sep 5, 2011
Messages
39
i have used the VB code in the link below

http://www.mcgimpsey.com/excel/lookuppics.html


Code:
Private Sub Worksheet_Calculate()
        Dim oPic As Picture
        Me.Pictures.Visible = False
        With Range("F1")
            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
the problem i have is the code makes all pictures on the sheet hidden, however there are some pictures on the skeet that need to be shown all of the time, is there a way i can stop some pics being hidden?
 
i have done this and it does not achieve quite what i want, this resizes the picture to fit in he cell, what i want is the bottom right corner of the prcture to be in the bottom right of the cell (the pic will be bigger that the cell but that is ok), is this possable
 
Upvote 0
i have done this and it does not achieve quite what i want, this resizes the picture to fit in he cell, what i want is the bottom right corner of the prcture to be in the bottom right of the cell (the pic will be bigger that the cell but that is ok), is this possable

ignore that it works prefectly thanks
 
Upvote 0

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