Hello;
I have an Excel application I'm using to import product images and allow the user to supply information about their products. After selecting images to insert, I'm using this code to insert filenames and thumbnails:
For f = 1 To UBound(files)
.[b65536].End(3)(2) = files(f)
.Range("C" & .[b65536].End(3).Row).Select
Selection.EntireRow.RowHeight = 36
With ActiveSheet.Pictures.Insert(files(f))
.ShapeRange.Height = 36
.Name = Right(files(f), Len(files(f)) - InStrRev(files(f), "\"))
I have a command button on the page to clear (reset) the sheet; but, I don't want to clear all images...just the images that were imported.
I'm using the following code which still seems to delete every image:
For Each shp In ActiveSheet.Shapes
If shp.Name <> "Picture2" Then shp.Delete
Next
Can anyone tell me how to code it so I only delete shapes imported in the above range? Thanks In Advance!
I have an Excel application I'm using to import product images and allow the user to supply information about their products. After selecting images to insert, I'm using this code to insert filenames and thumbnails:
For f = 1 To UBound(files)
.[b65536].End(3)(2) = files(f)
.Range("C" & .[b65536].End(3).Row).Select
Selection.EntireRow.RowHeight = 36
With ActiveSheet.Pictures.Insert(files(f))
.ShapeRange.Height = 36
.Name = Right(files(f), Len(files(f)) - InStrRev(files(f), "\"))
I have a command button on the page to clear (reset) the sheet; but, I don't want to clear all images...just the images that were imported.
I'm using the following code which still seems to delete every image:
For Each shp In ActiveSheet.Shapes
If shp.Name <> "Picture2" Then shp.Delete
Next
Can anyone tell me how to code it so I only delete shapes imported in the above range? Thanks In Advance!