Insert/Remove photos depending up on ref. cell value changing
Solved/Closed
jinoob
Posts
12
Registration date
Monday February 18, 2013
Status
Member
Last seen
October 1, 2013
-
Feb 18, 2013 at 07:28 AM
KALEEM - Oct 29, 2014 at 08:33 AM
KALEEM - Oct 29, 2014 at 08:33 AM
Related:
- Insert/Remove photos depending up on ref. cell value changing
- How to insert photo in word for resume - Guide
- Insert draft watermark in word on all pages - Guide
- Insert key on laptop - Guide
- Insert check mark in word - Guide
- Google drive photos - Guide
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Feb 18, 2013 at 07:32 AM
Feb 18, 2013 at 07:32 AM
Feb 20, 2013 at 06:07 AM
Requirement:-
1. If I type an image file name in A1 Cell(for eg: 4455)of Excel sheet, then the image/ photo of the same file no.should be displayed in B1 Cell.
2. If I cancel or change the file name in A1 Cell (For eg:- Instead of 4455, if I type 4465), then the previous photo in the B1 Cell according to the old file name should be deleted and the new photo as per the new file name given in A1 Cell should be displayed.
Feb 20, 2013 at 06:18 AM
Feb 20, 2013 at 06:24 AM
Feb 20, 2013 at 06:35 AM
Sub Picture()
Range("B1").Select 'This is where picture will be inserted
Dim picname As String
picname = Range("A1") 'This is the picture name
ActiveSheet.Pictures.Insert("C:\Users\JINOOB\Desktop\I A\" & picname & ".jpg").Select 'Path to where pictures are stored
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This resizes the picture
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
With Selection
.Left = Range("B1").Left
.Top = Range("B1").Top
.ShapeRange.LockAspectRatio = msoFalse
.ShapeRange.Height = 95#
.ShapeRange.Width = 80#
.ShapeRange.Rotation = 0#
End With
End Sub
Feb 20, 2013 at 06:35 AM
you need to have a
inside you can call that routine
I am not saying its 100%, but it is 95%. All it lack is delete