Vlookup Picture
Solved/Closed
Game Start Now
Posts
138
Registration date
Thursday January 21, 2010
Status
Member
Last seen
May 8, 2019
-
Aug 9, 2011 at 12:39 PM
Game Start Now Posts 138 Registration date Thursday January 21, 2010 Status Member Last seen May 8, 2019 - Aug 17, 2011 at 09:34 PM
Game Start Now Posts 138 Registration date Thursday January 21, 2010 Status Member Last seen May 8, 2019 - Aug 17, 2011 at 09:34 PM
Related:
- Vlookup Picture
- Convert picture to shape powerpoint - Guide
- Microsoft picture manager download - Download - Image viewing and management
- Start steam in big picture mode - Guide
- Does instagram notify when you change your profile picture - Guide
- How to insert picture in word without moving text - Guide
3 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Aug 9, 2011 at 07:37 PM
Aug 9, 2011 at 07:37 PM
Game Start Now
Posts
138
Registration date
Thursday January 21, 2010
Status
Member
Last seen
May 8, 2019
7
Aug 10, 2011 at 09:27 AM
Aug 10, 2011 at 09:27 AM
I have already tried this. If i type pic name first time it appears it but if i type second time, macro appears the pic but it didn't delete the previous pic from the sheet.
Game Start Now
Posts
138
Registration date
Thursday January 21, 2010
Status
Member
Last seen
May 8, 2019
7
Aug 10, 2011 at 09:30 AM
Aug 10, 2011 at 09:30 AM
And It Didnot Give The Msg Box If The Pic Was Not Found. And If The Pic Was Not Found It Didn't Blank The Old Pic. It Still Appears
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Aug 10, 2011 at 06:24 PM
Aug 10, 2011 at 06:24 PM
There is no delete in that code. It is based on assumption that one adds picture. How can one say what picture to delete or not.
From what I see, if the picture file is not present, it would print the msg saying picture not found. From what I recall who ever used it found both functionality to be working fine.
It does not have a delete functionality,
From what I see, if the picture file is not present, it would print the msg saying picture not found. From what I recall who ever used it found both functionality to be working fine.
It does not have a delete functionality,
Game Start Now
Posts
138
Registration date
Thursday January 21, 2010
Status
Member
Last seen
May 8, 2019
7
Aug 14, 2011 at 05:03 AM
Aug 14, 2011 at 05:03 AM
Sir I am using this formula and it works fine but i just want to add a few code in this.
I just want the condition that if the pic was not found in the given path then it shows the msgbox "Pic was not found" and show the Pic named No Photo.jpg
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewPic As String
If Target.Address = "$E$9" Then
NewPic = "F:\" & Range("E10").Value
Target.Comment.Shape.Fill.UserPicture NewPic
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
I just want the condition that if the pic was not found in the given path then it shows the msgbox "Pic was not found" and show the Pic named No Photo.jpg
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewPic As String
If Target.Address = "$E$9" Then
NewPic = "F:\" & Range("E10").Value
Target.Comment.Shape.Fill.UserPicture NewPic
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Aug 14, 2011 at 07:50 AM
Aug 14, 2011 at 07:50 AM
Use the DIR command before you try to add the picture to check if the file is present or not. (see in that thread if confused)
Game Start Now
Posts
138
Registration date
Thursday January 21, 2010
Status
Member
Last seen
May 8, 2019
7
Aug 14, 2011 at 09:45 PM
Aug 14, 2011 at 09:45 PM
I had already try that but didn't succeed...... thats why asking here friend
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Aug 15, 2011 at 07:19 AM
Aug 15, 2011 at 07:19 AM
NewPic = "F:\" & Range("E10").Value
If Dir(NewPic) = "" then
NewPic = "F:\NoPhoto.jpg"
msgbox "Missing a picture"
end if
Target.Comment.Shape.Fill.UserPicture NewPic
If Dir(NewPic) = "" then
NewPic = "F:\NoPhoto.jpg"
msgbox "Missing a picture"
end if
Target.Comment.Shape.Fill.UserPicture NewPic