J
Jeff W.
This is what I have and what it does is what ever image name
is in cell A1 it will insert that image into the cell that the cursor
is on, and that is working, but
Sub Photo1()
Application.ScreenUpdating = False
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim mypic As Picture
Dim res As Variant
Set WB = ActiveWorkbook
res = Sheet1.Range("A1").Value
If res = False Then Exit Sub
Set SH = ActiveSheet
Set rng = ActiveCell
Set mypic = SH.Pictures.Insert(res)
With mypic
.Top = rng.Top
.Left = rng.Left
.Locked = False
mypic.ShapeRange.LockAspectRatio = msoFalse
mypic.ShapeRange.Height = 213.1
mypic.ShapeRange.Width = 249.2
mypic.ShapeRange.Rotation = 0#
End With
End Sub
What I want it to do is go down the "A" column and insert the image
that is named is in the cell.
Here is an example of what I have in my sheet in the A column
ball.gif #row 1
bull.gif #row 4
center.gif #row 7
There may be 100 rows or more and differnt names in every 4th row
Can anyone help with this?
Thanks
Jeff w.
is in cell A1 it will insert that image into the cell that the cursor
is on, and that is working, but
Sub Photo1()
Application.ScreenUpdating = False
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim mypic As Picture
Dim res As Variant
Set WB = ActiveWorkbook
res = Sheet1.Range("A1").Value
If res = False Then Exit Sub
Set SH = ActiveSheet
Set rng = ActiveCell
Set mypic = SH.Pictures.Insert(res)
With mypic
.Top = rng.Top
.Left = rng.Left
.Locked = False
mypic.ShapeRange.LockAspectRatio = msoFalse
mypic.ShapeRange.Height = 213.1
mypic.ShapeRange.Width = 249.2
mypic.ShapeRange.Rotation = 0#
End With
End Sub
What I want it to do is go down the "A" column and insert the image
that is named is in the cell.
Here is an example of what I have in my sheet in the A column
ball.gif #row 1
bull.gif #row 4
center.gif #row 7
There may be 100 rows or more and differnt names in every 4th row
Can anyone help with this?
Thanks
Jeff w.