Public Sub ConvertToExcel(cmDialog As CommonDialog, fg1 As VSFlexGrid, frm As Form)
On Error GoTo ErrorHandler
Dim mPath As String
cmDialog.Filter = "Microsoft Office Excel |*.xls|"
cmDialog.FilterIndex = 1
cmDialog.ShowSave
If cmDialog.FileName = "" Then Exit Sub
mPath = cmDialog.FileName
With fg1
frm.MousePointer = MousePointerConstants.vbHourglass
.SaveGrid mPath, flexFileExcel, SaveExcelSettings.flexXLSaveFixedCells
frm.MousePointer = MousePointerConstants.vbDefault
End With
ErrorHandler:
If Err.Number <> 0 Then MsgBox Err.Description, vbExclamation, "Informasi"
End Sub
Tidak ada komentar:
Posting Komentar