In a userform, I will select one product (of 300+), and a image appear... and I have all pictures put in another userform and multipages (can't use a folder as this have to be shipped to and from different computers and people).
In my userform I can make the correct path to the image visible (chained together by the selections made) in a textbox, but can't make this a working path. can anywone point out the obvious errors I making ?
The code/example:
Private Sub TextBox1_Change()
'TextBox2.Value = ("MultiPage1." & "Page2." & "Image3" & ".Picture")
'The value in textbox2, is based on some selections in the userform and/or cells in sheet, so the page/image names
'changes due to different selections, but for the short version this will be the same principle....wouldn't it?
'WORKS - - - But have to make 350 if's ;-(
'If TextBox1 = 1 Then
'Image2.Picture = MultiPage1.Page1.Image1.Picture '(from userform1)
'Else
'Image2.Picture = UserForm2.MultiPage1.Page2.Image3.Picture
'End If
End Sub
Or are there any better ways?
In my userform I can make the correct path to the image visible (chained together by the selections made) in a textbox, but can't make this a working path. can anywone point out the obvious errors I making ?
The code/example:
Private Sub TextBox1_Change()
'TextBox2.Value = ("MultiPage1." & "Page2." & "Image3" & ".Picture")
'The value in textbox2, is based on some selections in the userform and/or cells in sheet, so the page/image names
'changes due to different selections, but for the short version this will be the same principle....wouldn't it?
'WORKS - - - But have to make 350 if's ;-(
'If TextBox1 = 1 Then
'Image2.Picture = MultiPage1.Page1.Image1.Picture '(from userform1)
'Else
'Image2.Picture = UserForm2.MultiPage1.Page2.Image3.Picture
'End If
End Sub
Or are there any better ways?