July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.
If sFileExt = ".jpeg" Or sFileExt = ".jpg" Or sFileExt = ".bmp" Or sFileExt = ".gif" Or sFileExt = ".jpeg" Or sFileExt = ".jpeg" Or sFileExt = ".tiff" Or sFileExt = ".png" Or sFileExt = ".JPG" Or sFileExt = ".BMP" Or sFileExt = ".GIF" Or sFileExt = ".JPEG" Or sFileExt = ".TIFF" Or sFileExt = ".PNG" Then Range("A" & lRow).Select Workbooks(DDM).Sheets("WIP").Activate ActiveCell.AddComment ActiveCell.Comment.Visible = False ActiveCell.Comment.Text Text:="Preview:" ActiveCell.Comment.Shape.Fill.UserPicture sLink ActiveCell.Comment.Shape.ScaleHeight 3#, msoFalse, msoscaleformtopleft ActiveCell.Comment.Shape.ScaleWidth 2.4, msoFalse, msoscaleformtopleft ' Insert image control Pic to set Picture height and width ' Then remove the picture, but leave the control so it's dimensions ' can be used to size the image Set Pict1 = ActiveSheet.Pictures.Insert(sLink) With Selection .HorizontalAlignment = xlLeft .VerticalAlignment = xlTop .ReadingOrder = xlContext .Orientation = xlHorizontal End With With ActiveCell.Comment.Shape .Height = Pict1.Height .Width = Pict1.Width End With Pict1.Delete Set Pict1 = Nothing Else End If
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.