Insert/Remove photos depending up on ref. cell value changing
Solved/Closed
jinoob
KALEEM - Oct 29, 2014 at 08:33 AM
- Posts
- 13
- Registration date
- Monday February 18, 2013
- Status
- Member
- Last seen
- October 1, 2013
KALEEM - Oct 29, 2014 at 08:33 AM
Related:
- Insert/Remove photos depending up on ref. cell value changing
- How to remove photo from outlook - Guide
- How to insert a photo in word resume - Guide
- Insert the current date and time in cell a1 ✓ - Forum - Excel
- How to insert rows in excel automatically based on cell value - Forum - Excel
- In ms excel, if you want to insert the same formula in a given cell of different worksheets then which of the following action y - Guide
2 replies
rizvisa1
Feb 18, 2013 at 07:32 AM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
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