;:realmad:
以下代码对前两个案例语句GT-116 PD和GT-116PC起支持作用,但对接下来的两个案例声明GT-16PB和GT.116PA无效。它将警告用户选择水平或垂直管道安装位置(见代码)
任何帮助都将不胜感激
标记VBA代码开始
-
- Private Sub cmd_sensor_gt_116_p_Click()
- 'ComboBox_gt_116_p Dropdown Menu
- ComboBox_gt_116_p.Style = fmStyleDropDownList
- 'Get ComboBox_gt_116_p Dropdown Menu user pick
- Select Case ComboBox_gt_116_p.Text
-
- Case "GT 116-PD" 'Calls sub from Module_ebtron_sensors
-
- If Opt1_gt_116_horiz = True Then
- 'Gets the Horizontal block
- Sensor_gt_116_pd_horizontal_get
- End If
- If Opt2_gt_116_vert = True Then
- 'Gets the Vertical block
- Sensor_gt_116_pd_vertical_get
- Else: pick_gt_116_position_warn
- End If
-
- Case "GT 116-PC" 'Calls sub from Module_ebtron_sensors
-
- If Opt1_gt_116_horiz = True Then
- 'Gets the Horizontal block
- Sensor_gt_116_pc_horizontal_get
- End If
-
- If Opt2_gt_116_vert = True Then
- 'Gets the Vertical block
- Sensor_gt_116_pc_vertical_get
- Else: pick_gt_116_position_warn
- End If
-
- Case "GT 116-PB" 'Calls sub from Module_ebtron_sensors
-
- If Opt1_gt_116_horiz = True Then
- 'Gets the Horizontal block
- Sensor_gt_116_pb_horizontal_get
- End If
-
- If Opt2_gt_116_vert = True Then
- 'Gets the Vertical block
- Sensor_gt_116_pb_vertical_get
- Else: pick_gt_116_position_warn
- End If
-
- Case "GT 116-PA" 'Calls sub from Module_ebtron_sensors
-
- If Opt1_gt_116_horiz = True Then
- 'Gets the Horizontal block
- Sensor_gt_116_pa_horizontal_get
- End If
-
- If Opt2_gt_116_vert = True Then
- 'Gets the Vertical block
- Sensor_gt_116_pa_vertical_get
- Else: pick_gt_116_position_warn
- End If
-
- End Select
-
- End Sub
|