1. 首页
  2. 编程语言
  3. VB
  4. 将MsFlexGrid控件中显示的内容输出到文本文件

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

上传者: 2018-12-28 13:02:21上传 TXT文件 803B 热度 53次
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 = MSF1.Rows For i = 0 To k - 1 strTemp = "" For j = 0 To MSF1.Cols - 1 DoEvents strTemp = strTemp & MSF1.TextM atrix(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 atrix(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
用户评论