彩票走势图

将MsFlexGrid控件中显示的内容输出到文本文件

翻译|其它|编辑:郝浩|2004-01-12 21:14:00.000|阅读 1101 次

概述:

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>



'OutDataToText
'将MsFlexGrid控件中显示的内容输出到文本文件
Public Sub OutDataToText(Flex As MSFlexGrid) 
    Dim s As String
    Dim i As Integer
    Dim j As Integer
    Dim k As Integer
    Dim strTemp As String
    On Error GoTo Ert
    Me.MousePointer = 11
    On Error Resume Next
    DoEvents
    Dim FileNum As Integer
    FileNum = FreeFile
    Open "d:\aa.txt" For Output As #FileNum
        With Flex
            k = .Rows
            For i = 0 To k - 1
                strTemp = ""
                For j = 0 To .Cols - 1
                    DoEvents
                    strTemp = strTemp & .TextMatrix(i, j) & ","
                Next j
                Print #FileNum, Left(strTemp, Len(strTemp) - 1)
            Next i
        End With
    Close #FileNum
    Me.MousePointer = 0
    MsgBox "导出成功"
Ert:
    MsgBox Err.Description
    Me.MousePointer = 0
End Sub


标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn


为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP