I
IvendsI
помогите решить проблему в коде суть поставленной задачи: При выборе в поле со списком наименования блюда, происходит изменение рисунка в элементе Image и в текстовом поле TextBox(Season) выводится текст с описанием этого блюда. Элемент поле со списком заполняется значениями программно с помощью массива. Вот код что не так внем?
Public Season(1 To 4) As Integer
Public Pictures(1 To 4) As String
Public Text(1 To 4) As String
Public i As Integer
Private Sub CmbSeason_Change()
k = Season.ListIndex + 1
Image1.Picture = LoadPicture("D:\Картинки\" + Pictures(k))
TextBox1.Value (Text(k))
End Sub
Private Sub UserForm_Initialize()
'= = Заполнения массива Season
Season(1) = "1"
Season(2) = "2"
Season(3) = "3"
Season(4) = "4"
'= = заполнения массива Pictures
Pictures(1) = "1.jpg"
Pictures(2) = "2.jpg"
Pictures(3) = "3.jpg"
Pictures(4) = "4.jpg"
'= = = заполнения массива Text
Text(1) = "1"
Text(2) = "2"
Text(3) = "3"
Text(4) = "4"
For j = 1 To 4
Season.AddItem (Season(j))
Next j
End Sub
Public Season(1 To 4) As Integer
Public Pictures(1 To 4) As String
Public Text(1 To 4) As String
Public i As Integer
Private Sub CmbSeason_Change()
k = Season.ListIndex + 1
Image1.Picture = LoadPicture("D:\Картинки\" + Pictures(k))
TextBox1.Value (Text(k))
End Sub
Private Sub UserForm_Initialize()
'= = Заполнения массива Season
Season(1) = "1"
Season(2) = "2"
Season(3) = "3"
Season(4) = "4"
'= = заполнения массива Pictures
Pictures(1) = "1.jpg"
Pictures(2) = "2.jpg"
Pictures(3) = "3.jpg"
Pictures(4) = "4.jpg"
'= = = заполнения массива Text
Text(1) = "1"
Text(2) = "2"
Text(3) = "3"
Text(4) = "4"
For j = 1 To 4
Season.AddItem (Season(j))
Next j
End Sub