Long time since I've been here and as a result have become very rusty.

I have a user form Stock_Images which just contains x number of images boxes each populated with an image which was manually cut and pasted in.

I now want to copy those images to another image box on a second User Form - Pirate_Game but to get the relevant Image Names (Source and Target) from a variable.

Here is my code ( caaled from command button in Pirate_Game form)which every time its run fails by giving a "Method or data member not found" at this line - Pirate_Game.TargetImage.Picture = Stock_Images.SourceImage.Picture

I know the basic syntax is correct as replacing the variables 'TargetImage" and "Source Image" with the actual Image Box name works.

What am I missing with these two varaibles? Or is there something else wrong.

Cheers

 Public Sub NewPlayer_Game()
Dim MyGameSeq(49, 1) As String
Dim SourceImage As String
Dim TargetImage As String
UniqueRandomGenerator
RowColList

' This takes the Random Number and cross references it to the corresponding A1 to G7 value
' The resultant array MyGameSeq(49,1) now contains the random A1 to G7 values


Count = 0
For Count = 1 To 49
Temp = Unique(Count, 1)
MyGameSeq(Temp, 1) = RowCol(Count, 1)

' Now populate the minigrid in the Pirate_Game form

SourceImage = "Image" & CStr(Count)
TargetImage = "Img_" & MyGameSeq(Count, 1)


Debug.Print MyGameSeq(Count, 1)


Select Case Count

Case 13 Or 14
SourceImage = "Image14"

Case 15 To 24
SourceImage = "Image13"

Case 25 To 49
SourceImage = "Image12"
End Select

Pirate_Game.TargetImage.Picture = Stock_Images.SourceImage.Picture


Debug.Print "Source Iamge is " & SourceImage
Debug.Print "Target Iamge is " & TargetImage

Next Count

End Sub