Skip to main content
Support is Offline
Today is our off day. We are taking some rest and will come back stronger tomorrow
Official support hours
Monday To Friday
From 09:00 To 17:30
  Saturday, 23 April 2022
  0 Replies
  1.8K Visits
0
Votes
Undo
This code treats even non image path cell as image path and props up error that it could not import file name " text in that cell"
This used to work well before some days, any clue?

Sub InsertPicFromFile()
Dim xRg As Range
Dim xCell As Range
Dim xVal As String
On Error Resume Next
Set xRg = Application.InputBox("Please select file path cells:", "KuTools for Excel", Selection.Address, , , , , 8)
If xRg Is Nothing Then Exit Sub
Application.ScreenUpdating = False
For Each xCell In xRg
xVal = xCell.Value
If xVal <> "" Then
ActiveSheet.Shapes.AddPicture xCell.Value, msoFalse, msoTrue, _
xCell.Offset(0, 1).Left, xCell.Top, xCell.Height, _
xCell.Height
End If
Next
Application.ScreenUpdating = True
End Sub
There are no replies made for this post yet.