Ok, so below is my macro.... however every time the ComboBox changes it takes forever to run through the "if" statements. Can anyone suggest a better way of doing this?
Code:
Private Sub ComboBox1_Change()
Sheets("Sheet1").Range("B2:B1000").ClearContents
If Sheets("Sheet1").Range("A1").Value = 9 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = True
Image5.Visible = True
Image6.Visible = True
Image7.Visible = True
Image8.Visible = True
Image9.Visible = True
ElseIf Sheets("Sheet1").Range("A1").Value = 8 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = True
Image5.Visible = True
Image6.Visible = True
Image7.Visible = True
Image8.Visible = True
Image9.Visible = False
ElseIf Sheets("Sheet1").Range("A1").Value = 7 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = True
Image5.Visible = True
Image6.Visible = True
Image7.Visible = True
Image8.Visible = False
Image9.Visible = False
ElseIf Sheets("Sheet1").Range("A1").Value = 6 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = True
Image5.Visible = True
Image6.Visible = True
Image7.Visible = False
Image8.Visible = False
Image9.Visible = False
ElseIf Sheets("Sheet1").Range("A1").Value = 5 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = True
Image5.Visible = True
Image6.Visible = False
Image7.Visible = False
Image8.Visible = False
Image9.Visible = False
ElseIf Sheets("Sheet").Range("A1").Value = 4 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = True
Image5.Visible = False
Image6.Visible = False
Image7.Visible = False
Image8.Visible = False
Image9.Visible = False
ElseIf Sheets("Sheet1").Range("A1").Value = 3 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = True
Image4.Visible = False
Image5.Visible = False
Image6.Visible = False
Image7.Visible = False
Image8.Visible = False
Image9.Visible = False
ElseIf Sheets("Sheet1").Range("A1").Value = 2 Then
Image1.Visible = True
Image2.Visible = True
Image3.Visible = False
Image4.Visible = False
Image5.Visible = False
Image6.Visible = False
Image7.Visible = False
Image8.Visible = False
Image9.Visible = False
ElseIf Sheets("Sheet1").Range("A1").Value >= 1 Then
Image1.Visible = True
Image2.Visible = False
Image3.Visible = False
Image4.Visible = False
Image5.Visible = False
Image6.Visible = False
Image7.Visible = False
Image8.Visible = False
Image9.Visible = False
End If
Range("A1").Value = 1
End Sub