I facing this problem in my system u have any idea why this happenHi Abhijeet ,
I downloaded your file , and ran the macro more than 20 times , saving it every now and then ; I did not face any problem.
Narayan
I facing this problem in my system u have any idea why this happenHi Abhijeet ,
I downloaded your file , and ran the macro more than 20 times , saving it every now and then ; I did not face any problem.
Narayan
Sub ShowMe()
For j = 1 To 9
Sheets("Sheet1").Shapes("GrpImg" & j).Visible = False
Next j
For i = 2 To Range("E" & Rows.Count).End(xlUp).Row
If Trim(Range("E" & i)) <> "" And Val(Trim(Range("E" & i))) > 0 And Val(Trim(Range("E" & i))) < 9 Then _
Sheets("Sheet1").Shapes("GrpImg" & Trim(Range("E" & i))).Visible = True
Next i
End Sub
For i = 1 To number_of_shapes
If Shapes(i).Name <> FIXED_SHAPE_NAME Then
Shapes(i).Delete
End If
Next
Hi Debraj This file I change in code but small problem 2nd time I change the date then last time symbol not change@NARAYANK991
In your uploaded attachment.. Some how you missed to change 1 to i
@Abhijeet
If you dont have any plan to change the picture within this year.. and all images are fixed.. then you can follow my procedure.. but if you are planning to change them .. frequently.. please follow Narayan's file with lil bit modification
Code:For i = 1 To number_of_shapes If Shapes(i).Name <> FIXED_SHAPE_NAME Then Shapes(i).Delete End If Next
Hi DebrajHi Abhijeet!
Here is another approach..
I have created duplicate image of all the required image named them in a particular way ... and just set them visible if any number found ..
Code:Sub ShowMe() For j = 1 To 9 Sheets("Sheet1").Shapes("GrpImg" & j).Visible = False Next j For i = 2 To Range("E" & Rows.Count).End(xlUp).Row If Trim(Range("E" & i)) <> "" And Val(Trim(Range("E" & i))) > 0 And Val(Trim(Range("E" & i))) < 9 Then _ Sheets("Sheet1").Shapes("GrpImg" & Trim(Range("E" & i))).Visible = True Next i End Sub
let us know.. if you are facing problem in adapting the same in your actual file..
'-----
For i = 1 To number_of_shapes
If Shapes(i).Name <> FIXED_SHAPE_NAME Then
Shapes(i).Delete
End If
Next
'-----
'-----
For i = number_of_shapes to 1 Step -1
If Shapes(i).Name <> FIXED_SHAPE_NAME Then
Shapes(i).Delete
End If
Next
'-----
Hi, Marc L!