mike0123m
05-02-2008, 10:24 AM
I have a combobox that is populated using the listfillrange. I would like the picture shown in an image control on the worksheet to change based on the value in the combobox combined with the value in cell R27 but I can't seem to get my code to work. Here is what I have:
Private Sub ComboBox4_Change()
Select Case Me.ComboBox4.Value & Range("r27").Value
Case "gable0-7"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/gable0-7.bmp")
Case "gable7-27"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/gable7-27.bmp")
Case "gable27-45"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/gable27-45.bmp")
Case "hip7-27"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/hip7-27.bmp.bmp")
Case "monoslope3-10"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/mono3-10.bmp")
Case "monoslope10-30"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/mono10-30.bmp")
End Select
End Sub
Private Sub ComboBox4_Change()
Select Case Me.ComboBox4.Value & Range("r27").Value
Case "gable0-7"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/gable0-7.bmp")
Case "gable7-27"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/gable7-27.bmp")
Case "gable27-45"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/gable27-45.bmp")
Case "hip7-27"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/hip7-27.bmp.bmp")
Case "monoslope3-10"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/mono3-10.bmp")
Case "monoslope10-30"
Me.Image2.Picture = LoadPicture("x:/excel programs/fbc tile/mono10-30.bmp")
End Select
End Sub