VB6中使用保存功能将在DataGrid中的数据保存起来,已经使用了控件CommonDialog,最好是能存成.xls文件。
现在我的文件只是调用了一个保存的界面,后面的代码不会写。
我前面的代码是
Dim sFile As String
With dlgCommonDialog
.DialogTitle = "保存"
.CancelError = False
.Filter = "所有文件(*.*)|*.*|文本文件(*.xls)|*.xls"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.SaveFile sFile
现在我的文件只是调用了一个保存的界面,后面的代码不会写。
我前面的代码是
Dim sFile As String
With dlgCommonDialog
.DialogTitle = "保存"
.CancelError = False
.Filter = "所有文件(*.*)|*.*|文本文件(*.xls)|*.xls"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.SaveFile sFile
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货