我有一个需要在 vb.net 上工作的 vb6 代码
Dim strFileName As String
Dim strText As String
Dim strFilter As String
Dim strBuffer As String
Dim FileHandle%
strFilter = "Comma Seperated File (*.csv)|*.csv"
CDMAIN.Filter = strFilter
CDMAIN.ShowSave
If CDMAIN.FileName <> "" Then
strFileName = CDMAIN.FileName
strText = Text1.Text
FileHandle% = FreeFile
'''''''''''''''''''我很难转换以下代码行
Open strFileName For Output As #FileHandle%
MousePointer = vbHourglass
Print #FileHandle%, strText
MousePointer = vbDefault
Close #FileHandle%
End If
该功能将数据保存到excel文件