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

相关文章:

  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2021-12-18
  • 2021-11-10
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案