cboLists.Activate
Dim
MovieTitle
As
Range
Dim
MoviePoster
As
String
Dim
ImageFolderPath
As
String
Dim
ImagePath
As
String
Dim
MovieName
As
String
MovieName = txtMovieName.Value
ImageFolderPath = Environ(
"UserProfile"
) &
"\Desktop\Movie Database\Movie Posters"
ImagePath = ImageFolderPath &
"\" & MovieName & "
.jpg"
imgMoviePoster.Picture = LoadPicture(ImagePath)
MoviePoster = imgMoviePoster.Picture
Set
MovieTitle = Range(
"P:P"
).Find(txtMovieName.Value, MatchCase:=
True
, LookAt:=xlWhole)
If
MovieTitle
Is
Nothing
Then
Range(
"P2"
).
End
(xlDown).
End
(xlDown).
End
(xlUp).Offset(1, 0).
Select
ActiveCell.Value = txtMovieName.Value
ActiveCell.AddComment
ActiveCell.Comment.Visible =
True
<strong>ActiveCell.Comment.Shape.Fill.UserPicture MoviePoster</strong>
ActiveCell.Comment.Shape.
Select
Selection.ShapeRange.ScaleWidth 1, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1, msoFalse, msoScaleFromTopLeft
ActiveCell.Comment.Visible =
False
End
If