I'm writing a program in macro that will check the name of the picture in a cell, then put a value on the next column based on the name of the picture.
My program only checks if the name of the picture exists in the activesheet.
My goal is to check if the name of the picture is on this cell and then put a value on the next column based on the name of the picture. Thanks a lot.
Sub CheckImageName()
Dim iRowCountShapes As Integer
Dim sFindShape As String
iRowCountShapes = 2
While Sheets("Data").Cells(iRowCountShapes, 1) <> ""
If Sheets("Data").Shapes("Rock").Name = "Rock" Then
Sheets("Data").Cells(iRowCountShapes, 3) = "Rock"
ElseIf Sheets("Data").Shapes("Roll").Name = "Roll" Then
Sheets("Data").Cells(iRowCountShapes, 3) = "Roll"
Else
Sheets("Data").Cells(iRowCountShapes, 3) = "Neither"
End If
iRowCountShapes = iRowCountShapes + 1
Wend
End Sub