Palamedesheights
New Member
- Joined
- Oct 30, 2008
- Messages
- 6
I have a form where I am letting the user choose the picture. The picture is put on the form and then placed in the appropriate spot in excel.
Later if it is edited I would like the picture in excel to be brought back into the form.
I have learned how to rename the objects (below) so I know what it is but I have not learned how to bring this up into a form like I do a picture from a folder [Insert_Picture.Picture = LoadPicture(Picture1)].
I would greatly appreciate anyones help in this.
Sub Object_To_Form
Dim sShapes As Shape, lLoop As Long
Dim wsStart As Worksheet, WsNew As Worksheet
Set wsStart = ActiveSheet
ActiveSheet.Pictures.Insert("C:\Documents and Settings\user\desktop\folder\Default Picture.jpg").Select
For Each sShapes In wsStart.Shapes
lLoop = lLoop + 1
With sShapes
If InStr(.Name, "Picture") > 0 Then
.Name = "Part 1"
End If
End With
Next sShapes
End Sub
Later if it is edited I would like the picture in excel to be brought back into the form.
I have learned how to rename the objects (below) so I know what it is but I have not learned how to bring this up into a form like I do a picture from a folder [Insert_Picture.Picture = LoadPicture(Picture1)].
I would greatly appreciate anyones help in this.
Sub Object_To_Form
Dim sShapes As Shape, lLoop As Long
Dim wsStart As Worksheet, WsNew As Worksheet
Set wsStart = ActiveSheet
ActiveSheet.Pictures.Insert("C:\Documents and Settings\user\desktop\folder\Default Picture.jpg").Select
For Each sShapes In wsStart.Shapes
lLoop = lLoop + 1
With sShapes
If InStr(.Name, "Picture") > 0 Then
.Name = "Part 1"
End If
End With
Next sShapes
End Sub