Excel VBA,面临一些问题

时间:2018-11-14 10:30:10

标签: excel vba

我有此代码:

For Search_Library = 0 To 200
    j = Search_Library * 20
    If Worksheets("Config Algemeen").Range("H2").offset(Search_Config, 0).Value = Worksheets("Library").Range("A2").offset(j, 0).Value Then
        For k = 1 To 200
            l = k * 2
            For m = 0 To 19
                MyChoices(m) = Worksheets("Library").Range("A2").offset(j + m, l).Value
            Next m
                With Worksheets("Config Algemeen").Range("H2").offset(Search_Config, k).Validation
                    .Delete
                    .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
                    Operator:=xlBetween, Formula1:=Join(MyChoices, ",")
                End With
        Next k
    Else
        'Nothing
    End If
Next Search_Library

现在我遇到了一个问题:每当“ Search_Library”的值达到200(最大值)时,我都想遍历“ Search_Config”。循环浏览“ Search_Config”的最佳方法是什么?基本上,我想将1(+1)添加到“ Search_Config”,并从零(0)开始使用“ Search_Library”。

1 个答案:

答案 0 :(得分:0)

if (!!window.EventSource) {
  var source = new EventSource('/upload');
  console.log(source)
  source.onmessage = function(e) {
    console.log(e)
    var byte = e.data;
    console.log(e.data)
    var res = byte.split(/\s/);


     var markup = "<tr><td><input type='checkbox' name='record'></td><td>" + res[0] +  "</td></tr>";
            $("#mytable").append(markup);
  }
}

它现在正在这样工作。一切似乎都很好。它像岩石一样快速而独立。感谢你们对我的帮助!它使我走上了正轨。