C
Corey
I have used the following code (part of another procedure) to place a picture over a cell in a
sheet by the picture addres located on my PC.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Photo 1
Application.ScreenUpdating = False
If Range("C112").Value <> "" Then
Range("C97").Select
ActiveSheet.Unprotect
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim mypic As Picture
Dim res As Variant
Set WB = ActiveWorkbook
res = rngFound.Offset(0, 23).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#
ActiveCell.Offset(1, 0).Value = res
End With
End If
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But i am trying to do the same, but the picture to be displayed on a userform(Image1), but have not
been able to do so.
1). Is this possible?
2). How would it be coded?
Any assistance would be appreciated.
Regards
Corey....
sheet by the picture addres located on my PC.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Photo 1
Application.ScreenUpdating = False
If Range("C112").Value <> "" Then
Range("C97").Select
ActiveSheet.Unprotect
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim mypic As Picture
Dim res As Variant
Set WB = ActiveWorkbook
res = rngFound.Offset(0, 23).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#
ActiveCell.Offset(1, 0).Value = res
End With
End If
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But i am trying to do the same, but the picture to be displayed on a userform(Image1), but have not
been able to do so.
1). Is this possible?
2). How would it be coded?
Any assistance would be appreciated.
Regards
Corey....