zoukankan      html  css  js  c++  java
  • vb 实现传递 控件数组


    Private Sub Command1_Click()
        Dim strLevelAdapt As String
        strLevelAdapt = "" 
      Call TransFormers.CheckBoxCapToWord(Check1 ,2)
      Debug.Print strLevelAdapt
    End Sub
    ’-------------------------------
    'TransFormers 模块
    '将checkbox的选择转化成Word
    Public Function CheckBoxCapToWord(ByRef CheckBoxP As Object,byval Number As Integer) As String 
    '注意上面红色的字体位置就行了.
    On Error GoTo errlst
        Dim ReturnValue As String
        ReturnValue = ""
        For i = 0 To Number  '对象划分
            If CheckBoxP(i).Value = 1 Then
                If ReturnValue = "" Then
                    ReturnValue = CheckBoxP(i).Caption
                Else
                    ReturnValue = ReturnValue & "|" & CheckBoxP(i).Caption
                End If
            End If
        Next
        CheckBoxCapToWord = ReturnValue
        Exit Function
    errlst:
      Call WriteErrFile("TransFormers.CodeToWord():" + Err.Description)
        Err.Clear
        Resume Next
    End Function
  • 相关阅读:
    函数重载和函数指针在一起
    Uva
    Uva
    Uva
    Uva
    Uva
    CCPC-Wannafly-day5
    CCPC-Wannafly-day3
    CCPC-Wannafly-day2
    CCPC-Wannafly-Winter 2020.01.12总结
  • 原文地址:https://www.cnblogs.com/no7dw/p/1615583.html
Copyright © 2011-2022 走看看