如何在VBA中纠正过程太长

时间:2017-11-28 14:28:46

标签: excel vba excel-vba procedure

我终于解决了所有问题,现在程序太长了。我在这个网站上看到过其他修复但有点模糊。我的代码是这样开始的:

[(1, 1), (1, 2), (2, 2), (3, 1)]

依旧...... 我有6个不同的组合框,任何帮助将不胜感激。
感谢

1 个答案:

答案 0 :(得分:1)

我认为你可以使用

 Private Sub ComboBox6_Change()
 Dim s as string
 If ComboBox1.Value = "CONVERTING" then
      s = ComboBox2.Value & "(" & ComboBox3.Value & "," & ComboBox4.Value
      s = s & "," &  ComboBox5.value & "," & Combobox6.value
      Select case ComboBox6.index
           case 1
               s = s & ") FG $0.0389/LB"
           case 2
               s = s & ") FH $0.0318/LB"