MrPink1986
Active Member
- Joined
- May 1, 2012
- Messages
- 252
Hi,
I have a multi page user form that I am using to predict scores for the premier league soccer fixtures each week. Within each page I have 1 fixture made up of a home team and an away team. This data changes week on week depending on the a web import. I want to add two images to each page which will represent the team crest of the team in each text box.
I have the team crests on a tab named "Pictures" with each crest in a cell beginning with C2.
My text boxes are named Fixture1_Home Fixture1_Away - Fixture10_Home Fixture10_Away this will pick up the 20 teams each week.
In my image box I want some code to say if Fixture1_Home is X then pick up the picture and apply this to the image box (my image boxes are named Fix1_Home_Image, Fix1_Away_Image etc)
Once this is defined I am then presuming I can call the Sub UserForm_Initialize stage.
I have attempted the below for the Manchester United team as the away team in the fixture 9 test box.
Any help is greatly appreciated.
I have a multi page user form that I am using to predict scores for the premier league soccer fixtures each week. Within each page I have 1 fixture made up of a home team and an away team. This data changes week on week depending on the a web import. I want to add two images to each page which will represent the team crest of the team in each text box.
I have the team crests on a tab named "Pictures" with each crest in a cell beginning with C2.
My text boxes are named Fixture1_Home Fixture1_Away - Fixture10_Home Fixture10_Away this will pick up the 20 teams each week.
In my image box I want some code to say if Fixture1_Home is X then pick up the picture and apply this to the image box (my image boxes are named Fix1_Home_Image, Fix1_Away_Image etc)
Once this is defined I am then presuming I can call the Sub UserForm_Initialize stage.
I have attempted the below for the Manchester United team as the away team in the fixture 9 test box.
Code:
Private Sub Fix9_Away_Image_Click()If Fixture9_Away_Change = "Manchester United" Then
Fix9_Away_Image.Picture = Sheets("Pictures").Range("C2")
End If
End Sub
Any help is greatly appreciated.