Hello all, When trying to export save a file i get the following error in my SaveDialog window: The bold line is where the error occurs, says: Object Required

Dim eRuta As String
On Local Error GoTo errores
'dialog.DialogTitle = "Exportar Archivo"
cDialog.Filter = "Excel File (*.XLS)"
cDialog.FileName = "Reporte.XLS"
With cDialog
       
       .Filter = "Excel Files (*.xls)|*.xls"
       
        cDialog.ShowSave
    End With

 [B]   eRuta = frmRutaExcel.dialog.FileName[/B]
    
If eRuta <> "" Then
txtRuta.Text = Trim(eRuta)
End If

Can we assume that cDialog is the name of the common dialog control on your form frmRutaExcel? If so, then the bolded line should read:

eRuta = frmRutaExcel.cDialog.FileName
commented: agree. +9

You have mistyped the common dialog control name.

should be cDialog not dialog.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.