我想将用户输入的值从excel vba中运行时创建的组合框传输到电子表格

时间:2017-05-10 16:17:54

标签: excel vba excel-vba

我能够提出这个算法,但我没有得到它的结果。

Set NewCombo1 = Me.Controls.Add("Forms.ComboBox.1", "newCombo" & (NewSet), True)

Private Sub CommandButton1_Click()

    'Make Sheet1 active
    Sheets("ShipmentDetails").Activate

    'Determine emptyRow
    emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1

    'Transfer information
    Cells(emptyRow, 6).Value = Sku1.Value

    For NewSet = 2 To 3
        'This is the dynamically created comboBox
        Me.Controls("newCombo" & (NewSet)).Value = Cells(emptyRow + (NewSet) - 1, 6).Value
    Next NewSet

0 个答案:

没有答案