Здравствуйте. В коде выполняется загрузка картинки и последнее IF. У меня планируется много видов заполнения формы в зависимости от выбора ComboBox23. Не могу двинуться дальше. Прошу помочь в решении проблемы
Код |
---|
Public Sub ComboBox23_Change() Dim strSystemType As String Dim МодулиPath As String Dim strFullFilePath As String МодулиPath = ThisWorkbook.Path & "\Модули\" strSystemType = UserForm1.ComboBox23.Text strFullFilePath = МодулиPath & Application.PathSeparator & strSystemType & ".jpg" If IsExists(strFullFilePath) Then Image5.Picture = LoadPicture(strFullFilePath) End If Sheets("Расчёт").Range("E3") = ComboBox23.Text If (ComboBox23.Text = Sheets("Справочник").Range("F2")) Or (ComboBox23.Text = Sheets("Справочник").Range("F3")) Or (ComboBox23.Text = Sheets("Справочник").Range("F4")) Then Frame9.Visible = False Image3.Visible = False Image11.Visible = False Frame2.Left = 0 Frame2.Width = 570 Sheets("Расчёт").Range("E20") = "" ComboBox15.Visible = False ComboBox4.Visible = False ComboBox30.Visible = False ComboBox29.Visible = False ComboBox31.Visible = False Label139.Visible = False Label140.Visible = False Label144.Visible = False Label147.Visible = False Label148.Visible = False Label149.Visible = False Else Frame9.Visible = True Image3.Visible = True Image11.Visible = True Frame2.Left = 144 Frame2.Width = 426 ComboBox15.Visible = True ComboBox4.Visible = True ComboBox30.Visible = True ComboBox29.Visible = True ComboBox31.Visible = True Label139.Visible = True Label140.Visible = True Label144.Visible = True Label147.Visible = True Label148.Visible = True Label149.Visible = True End If If ComboBox23.Text = Sheets("Справочник").Range("F5") Then Frame9.Visible = False Image3.Visible = False Image11.Visible = False Frame2.Left = 0 Frame2.Width = 570 Sheets("Расчёт").Range("E20") = "" ComboBox18.RowSource = "Количество1" ComboBox2.RowSource = "Открывание_вбок" ComboBox15.Visible = False ComboBox4.Visible = False ComboBox30.Visible = False ComboBox29.Visible = False ComboBox31.Visible = False Label139.Visible = False Label140.Visible = False Label144.Visible = False Label147.Visible = False Label148.Visible = False Label149.Visible = False Else Frame9.Visible = True Image3.Visible = True Image11.Visible = True Frame2.Left = 144 Frame2.Width = 426 ComboBox18.RowSource = "Количество" ComboBox2.RowSource = "Открывание_фасада" ComboBox15.Visible = True ComboBox4.Visible = True ComboBox30.Visible = True ComboBox29.Visible = True ComboBox31.Visible = True Label139.Visible = True Label140.Visible = True Label144.Visible = True Label147.Visible = True Label148.Visible = True Label149.Visible = True End If End Sub |