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
  • 相关阅读:
    操作系统简介
    正则表达式
    Python socket
    计算机网络基础
    计算机基础
    Python常用模块
    Python模块和包
    Python反射和内置方法(双下方法)
    Python类的成员
    更改命令行,完全显示hostname
  • 原文地址:https://www.cnblogs.com/no7dw/p/1615583.html
Copyright © 2011-2022 走看看