On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.
Sub InsertPictures_Linked_To_File() ' by rorya from EE Dim C As Range Dim Image As Picture If MsgBox("Would you like to add pictures to the active worksheet, linking them?" & vbCrLf & vbCrLf & _ "There must be network paths as hyperlinks to draw the picture from!", vbQuestion + vbYesNo, "Insert Pictures into Column D") = vbNo Then Exit Sub End If On Error Resume Next For Each C In Range(Range("C2"), Range("C" & Rows.Count).End(xlUp)) C.Offset(0, 1).Activate Set Image = ActiveSheet.Pictures.Insert(C.Value2) 'linktofile:=msoFalse With Image If .Height > Application.CentimetersToPoints(4) Then _ .ShapeRange.ScaleHeight Application.CentimetersToPoints(4) / .Height, msoCTrue .TopLeftCell.RowHeight = Image.Height + 10 If .Height > .Width Then With .ShapeRange .Rotation = 90 .IncrementLeft .Height / 2 - .Width / 2 .IncrementTop .Width / 2 - .Height / 2 + 5 End With .TopLeftCell.RowHeight = Image.Width + 10 Else: .ShapeRange.IncrementTop (5) End If End With Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|A WS within a WS||11||42|
|vba sort not working when code running||3||24|
|Macro Modification to refresh non-contiguous Cells in a Worksheet||12||39|
|count values within multiple bands||7||34|
Join the community of 500,000 technology professionals and ask your questions.